Skip to content

rixo/svite

 
 

Repository files navigation

svite

svelte + vite = sweet

features

  • read svelte configruation with cosmiconfig
  • svelte preprocessor support
  • hot module reloading thanks to svelte-hmr
  • drop-in installation as vite plugin

quickstart

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 /dist

usage

installation

Install svite as a dev dependency

npm install -D svite

Don't forget to install missing peer dependencies

Add as plugin to vite.config.js

const svite = require('svite');
module.exports = {
  plugins: [svite()],
};

run

just use regular vite or vite build commands

{
  "scripts": {
    "dev": "vite",
    "build": "vite build"
  }
}

check out the examples

as barebones as it gets, just an essential App.svelte

limitations

  • this is a very early version, expect things to break, hard.
  • vite options like --ssr or --sourcemap
  • dev mode with externalized css

TODO

  • more examples

    • preprocessor support (postcss with tailwind)
    • config
    • routify
  • more features

    • vite options

Credits

  • rixo - without svelte-hmr and your support this would not have been possible
  • vite-plugin-svelte - initial inspiration

About

svelte integration for vite

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%