#createreactapp — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #createreactapp, aggregated by home.social.
-
Is #javascript module system still schizophrenic? I wanted to reuse some non-#React code from a #CreateReactApp project on the command line. But CRA uses import from .js files, so gotta switch "type" in package.json, but then it turned out some library used XMLHttpRequest, which isn't available from modules (?).
Anyway - what are best practices for #js command line apps? Should I just use #typescript now? If so, same question?
Probably won't reuse code and run python or R instead.
-
Is #javascript module system still schizophrenic? I wanted to reuse some non-#React code from a #CreateReactApp project on the command line. But CRA uses import from .js files, so gotta switch "type" in package.json, but then it turned out some library used XMLHttpRequest, which isn't available from modules (?).
Anyway - what are best practices for #js command line apps? Should I just use #typescript now? If so, same question?
Probably won't reuse code and run python or R instead.
-
Is #javascript module system still schizophrenic? I wanted to reuse some non-#React code from a #CreateReactApp project on the command line. But CRA uses import from .js files, so gotta switch "type" in package.json, but then it turned out some library used XMLHttpRequest, which isn't available from modules (?).
Anyway - what are best practices for #js command line apps? Should I just use #typescript now? If so, same question?
Probably won't reuse code and run python or R instead.
-
Is #javascript module system still schizophrenic? I wanted to reuse some non-#React code from a #CreateReactApp project on the command line. But CRA uses import from .js files, so gotta switch "type" in package.json, but then it turned out some library used XMLHttpRequest, which isn't available from modules (?).
Anyway - what are best practices for #js command line apps? Should I just use #typescript now? If so, same question?
Probably won't reuse code and run python or R instead.
-
Is #javascript module system still schizophrenic? I wanted to reuse some non-#React code from a #CreateReactApp project on the command line. But CRA uses import from .js files, so gotta switch "type" in package.json, but then it turned out some library used XMLHttpRequest, which isn't available from modules (?).
Anyway - what are best practices for #js command line apps? Should I just use #typescript now? If so, same question?
Probably won't reuse code and run python or R instead.
-
4. All set up!
It took me about an hour to set up Vite.js into desired configuration to allow that specific React+TypeScript project into running. I hope it will also help you to kickstart your migration CRA => Vite.
-
4. All set up!
It took me about an hour to set up Vite.js into desired configuration to allow that specific React+TypeScript project into running. I hope it will also help you to kickstart your migration CRA => Vite.
-
4. All set up!
It took me about an hour to set up Vite.js into desired configuration to allow that specific React+TypeScript project into running. I hope it will also help you to kickstart your migration CRA => Vite.
-
4. All set up!
It took me about an hour to set up Vite.js into desired configuration to allow that specific React+TypeScript project into running. I hope it will also help you to kickstart your migration CRA => Vite.
-
4. All set up!
It took me about an hour to set up Vite.js into desired configuration to allow that specific React+TypeScript project into running. I hope it will also help you to kickstart your migration CRA => Vite.
-
3. Vite config
95% of config was easy to set up, the only thing I had to search online was how to force Vite into using HTTPS with some sort of certificate. It was possible with vite-plugin-basic-ssl[1].
-
3. Vite config
95% of config was easy to set up, the only thing I had to search online was how to force Vite into using HTTPS with some sort of certificate. It was possible with vite-plugin-basic-ssl[1].
-
3. Vite config
95% of config was easy to set up, the only thing I had to search online was how to force Vite into using HTTPS with some sort of certificate. It was possible with vite-plugin-basic-ssl[1].
-
3. Vite config
95% of config was easy to set up, the only thing I had to search online was how to force Vite into using HTTPS with some sort of certificate. It was possible with vite-plugin-basic-ssl[1].
-
3. Vite config
95% of config was easy to set up, the only thing I had to search online was how to force Vite into using HTTPS with some sort of certificate. It was possible with vite-plugin-basic-ssl[1].
-
2. Add support for tests (Jest, React Testing Library)
That one was tricky, but thanks to 2 articles on Medium (I will link to privacy-friendly versions) I managed to run tests.
[1]: https://scribe.rip/quick-jest-setup-with-vitejs-react-typescript-82f325e4323f
[2]: https://scribe.rip/how-to-setup-jest-and-react-testing-library-in-vite-project-2600f2d04bdd -
2. Add support for tests (Jest, React Testing Library)
That one was tricky, but thanks to 2 articles on Medium (I will link to privacy-friendly versions) I managed to run tests.
[1]: https://scribe.rip/quick-jest-setup-with-vitejs-react-typescript-82f325e4323f
[2]: https://scribe.rip/how-to-setup-jest-and-react-testing-library-in-vite-project-2600f2d04bdd -
2. Add support for tests (Jest, React Testing Library)
That one was tricky, but thanks to 2 articles on Medium (I will link to privacy-friendly versions) I managed to run tests.
[1]: https://scribe.rip/quick-jest-setup-with-vitejs-react-typescript-82f325e4323f
[2]: https://scribe.rip/how-to-setup-jest-and-react-testing-library-in-vite-project-2600f2d04bdd -
2. Add support for tests (Jest, React Testing Library)
That one was tricky, but thanks to 2 articles on Medium (I will link to privacy-friendly versions) I managed to run tests.
[1]: https://scribe.rip/quick-jest-setup-with-vitejs-react-typescript-82f325e4323f
[2]: https://scribe.rip/how-to-setup-jest-and-react-testing-library-in-vite-project-2600f2d04bdd -
2. Add support for tests (Jest, React Testing Library)
That one was tricky, but thanks to 2 articles on Medium (I will link to privacy-friendly versions) I managed to run tests.
[1]: https://scribe.rip/quick-jest-setup-with-vitejs-react-typescript-82f325e4323f
[2]: https://scribe.rip/how-to-setup-jest-and-react-testing-library-in-vite-project-2600f2d04bdd -
1. Remove CRA & install Vite.js
This is pretty straight-forward, I followed an example for react-ts available at Vite documentation[1].
-
1. Remove CRA & install Vite.js
This is pretty straight-forward, I followed an example for react-ts available at Vite documentation[1].
-
1. Remove CRA & install Vite.js
This is pretty straight-forward, I followed an example for react-ts available at Vite documentation[1].
-
Recently I had to replace create-react-app with Vite.js in one project at work. This is a thread of what I did to make that work:
-
Recently I had to replace create-react-app with Vite.js in one project at work. This is a thread of what I did to make that work:
-
Recently I had to replace create-react-app with Vite.js in one project at work. This is a thread of what I did to make that work:
-
Recently I had to replace create-react-app with Vite.js in one project at work. This is a thread of what I did to make that work:
-
Recently I had to replace create-react-app with Vite.js in one project at work. This is a thread of what I did to make that work:
-
Should #NPM libraries handle #bundling themselves?
I'm working in a library for internal use. It will be acting as a utility wrapper for a larger #nodejs library and will be used in two main use cases #CreateReactApp and custom #Webpack projects. This is my first time building a utility library from scratch and was thinking of using Webpack to handle the bundling, tree shaking, and minification, and using #babel for transpiling.
Is this necessary or should this even be done?
-
Should #NPM libraries handle #bundling themselves?
I'm working in a library for internal use. It will be acting as a utility wrapper for a larger #nodejs library and will be used in two main use cases #CreateReactApp and custom #Webpack projects. This is my first time building a utility library from scratch and was thinking of using Webpack to handle the bundling, tree shaking, and minification, and using #babel for transpiling.
Is this necessary or should this even be done?
-
Should #NPM libraries handle #bundling themselves?
I'm working in a library for internal use. It will be acting as a utility wrapper for a larger #nodejs library and will be used in two main use cases #CreateReactApp and custom #Webpack projects. This is my first time building a utility library from scratch and was thinking of using Webpack to handle the bundling, tree shaking, and minification, and using #babel for transpiling.
Is this necessary or should this even be done?
-
Should #NPM libraries handle #bundling themselves?
I'm working in a library for internal use. It will be acting as a utility wrapper for a larger #nodejs library and will be used in two main use cases #CreateReactApp and custom #Webpack projects. This is my first time building a utility library from scratch and was thinking of using Webpack to handle the bundling, tree shaking, and minification, and using #babel for transpiling.
Is this necessary or should this even be done?
-
Should #NPM libraries handle #bundling themselves?
I'm working in a library for internal use. It will be acting as a utility wrapper for a larger #nodejs library and will be used in two main use cases #CreateReactApp and custom #Webpack projects. This is my first time building a utility library from scratch and was thinking of using Webpack to handle the bundling, tree shaking, and minification, and using #babel for transpiling.
Is this necessary or should this even be done?