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].
#react #createreactapp #Vitejs #typescript
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.
#react #createreactapp #Vitejs #typescript
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].
#react #createreactapp #Vitejs #typescript
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
#react #createreactapp #Vitejs #typescript
1. Remove CRA & install Vite.js
This is pretty straight-forward, I followed an example for react-ts available at Vite documentation[1].
#react #createreactapp #Vitejs #typescript
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:
#react #createreactapp #Vitejs #typescript
It's been a long while since I've used create-react-app. I was getting an error about having it globally installed when I didn’t.
Running `npx clear-npx-cache` sorted it out for me. https://stackoverflow.com/a/70365300
#react #createreactapp #js #stackoverflowdrivendevelopment
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?
#npm #bundling #nodejs #createreactapp #webpack #babel #javascript #dev
Does anyone have a suggestion for a good (free at low volume) analytics service that works well with #React? Other than Google.
#react #coding #reactjs #createreactapp #js #javascript
How to verify a website in a M profile when the website is a #ReactJS app?
I have tried putting the verification link in the public/index.html file both inside and outside of <div id="root">.
I have also tried putting it on the page of the final rendered app.
But neither works. Ideas?
#mastodon #mastodonhelp #mastodonadmin #ReactJS #CreateReactApp
#reactjs #Mastodon #mastodonhelp #mastodonadmin #createreactapp