- read svelte configruation with cosmiconfig
- svelte preprocessor support
- hot module reloading thanks to svelte-hmr
- drop-in installation as vite plugin
npx degit dominikg/svite/examples/minimal my-first-svite-project
cd my-first-svite-project
npm install
npm run dev # starts dev-server with hot-module-reloading
npm run build # builds to /distInstall svite as a dev dependency
npm install -D sviteDon't forget to install missing peer dependencies
Add as plugin to vite.config.js
const svite = require('svite');
module.exports = {
plugins: [svite()],
};just use regular vite or vite build commands
{
"scripts": {
"dev": "vite",
"build": "vite build"
}
}as barebones as it gets, just an essential App.svelte
- this is a very early version, expect things to break, hard.
- vite options like --ssr or --sourcemap
- dev mode with externalized css
-
more examples
- preprocessor support (postcss with tailwind)
- config
- routify
-
more features
- vite options
- rixo - without svelte-hmr and your support this would not have been possible
- vite-plugin-svelte - initial inspiration