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
Vite.js 4.4 will experimentally support Lightning CSS
https://link.medium.com/sLRbo5CC0Ab
#javascript #vitejs #css
I recently began to use Rollup Plugin Visualizer to take a good hard look at one of my company’s frontend applications.
I found that someone had installed an npm package containing every zipcode in the US and Canada. The package literally doubled the size of the application. It was larger than all the image assets, other node modules, components for the entire application, and was only used on one form which already used google maps’ api. I was dying laughing.
So hey, take a look at your node modules every once in a while, and make sure you know how big a thing is when you install it.
Vite 4.3 is out
https://vitejs.dev/blog/announcing-vite4-3.html
#ES_Next_News #ECMAScript #JavaScript #ViteJS #Vite
#es_next_news #ecmascript #javascript #Vitejs #vite
Les trois points essentiels de l'annonce de la v4.3 de #Vitejs sont dans publiés :
#Vitejs #webdev #javascript #typescript
Who knew passing a command line parameter or environment variable to your app via the bundler was so involved?
#javascript #Vitejs #webdev #typescript
Spent a full day trying to make #Vitejs output full source sourcemaps for dependencies into the build sourcemap file. No luck 😕
Will try other build systems next.
Join me for Storybook Day tomorrow (March 14). I'll be talking about the performance improvements we've made in #storybook, how we achieved first-class #viteJS support, and what we've done to reduce the storybook install size.
See the full schedule at https://storybook.js.org/day/schedule, and join us in Discord to discuss and ask questions. https://discord.gg/storybook
RT @marcobrunodev
Curso de #React e #ViteJS, #Solidity, #AzureFunctiom com #Node e muito mais!!!
Bora fazer o curso grátis acontecer
Dá Like, RT e faça muitos comentários felizes
Aqui não tem pegadinha da semana da programação é um curso completo, grátis e feliz
Pequeno spolier e meta na thread
#react #Vitejs #solidity #azurefunctiom #node
Just set up a new personal project. Trying #Vitejs for the first time, and my first upgrade to #Storybook 7. Excited to be working with both. Was up and running in 5 minutes after watching this talk from @IanVS (thank you!)
My current stack for web apps:
• #vitejs
• #vuejs
• #alpinejs
• #tailwindcss
• #django
• #docker compose
Parts of it feel a bit retro but everything works together nicely, I can now spin up a new project in under 15min and updates in the browser feel instant.
#Vitejs #vuejs #AlpineJS #tailwindcss #django #docker
Underrated feature of #viteJS: It warns me when it starts up if there's a dependency being used that isn't installed (e.g. when switching between branches). It's much nicer than hitting a runtime error, and reminds me that I need to run an `npm install`. 😍
In #vitejs build how would one approach a custom output path for a specific file? src/file.js to go in dist/file.js.
Everything else should get the default stuff