This project is a starter kit for building app using Svelte and Webpack with easy setup and customization.
- dev server with live reload and error messages
- minimal webpack setup
- Handling static assets and various file formats
- Checking for duplicate modules and packages in bundles
- static serving scripts
- easy to customize and update
git clone https://github.com/faraadi/svelte-webpack-template
cd svelte-webpack-template
npm install
npm start
open localhost:3000 in your browser.
packs and compile your code and run development server on port 3000
and watch for file changes.
build your application and make a optimized and minified version of your code and put it in dist
directory.
all assets in public
folder will be copied in dist
directory.
Warning! all assets placed in
dist
, will be removed when running this script
after running a successful build, you can run this script to preview a local version of your app.
run:
npm run build
npm run serve
then open localhost:5000
customization is straightforward and can be done through configuration files, placed in /configs
directory.
you'll find two file:
webpack.config.dev.js
- for development modewebpack.config.prod.js
- for production mode
- vendors and runtime code splitting
- env support
- env config files
- Polyfills
- ESLint support
- Source Code Analyze Tool
This software is open sourced under MIT.