Writing JavaScript code in the form of ES6 modules has become a common industry practice. Browsers today already have the support for ES6 modules, but just like with most other problems in web development, not all browsers support it.

So, instead of serving the exact ES modules to the client, we have to rely on a build system to transpile and bundle the code into something that all browsers can process, not just for production but also for development.

This seems like an awful lot of unnecessary bundling during the development cycle, since the developers can just use a modern browser while they’re developing the app.

Would it be nice if we had a way to serve the ES modules directly only for development, and we can let the build system bundle the code for production as usual? That way we get all the speed benefits of running the modules directly, without dropping support for IE.

Vite can help us to do just that.

Vite is a Vue.js application build tool, authored by the creator of Vue, Evan You. In the rest of this article, we’ll take a closer look at what it is and what it does, with a brief hands-on code demonstration.

#vue #javascript #web-development #developer

Faster hot reloading for Vue development with Vite | Vue Mastery
9.05 GEEK