Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandonxiang/svelte-webpack-mpa
A template to create multi-page application powered by webpack
https://github.com/brandonxiang/svelte-webpack-mpa
boilerplate-template svelte svelte-v3 sveltejs template webpack
Last synced: 2 months ago
JSON representation
A template to create multi-page application powered by webpack
- Host: GitHub
- URL: https://github.com/brandonxiang/svelte-webpack-mpa
- Owner: brandonxiang
- License: mit
- Created: 2019-07-13T02:03:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T16:28:25.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T12:58:08.636Z (3 months ago)
- Topics: boilerplate-template, svelte, svelte-v3, sveltejs, template, webpack
- Language: JavaScript
- Homepage: https://github.com/brandonxiang/svelte-webpack-template
- Size: 295 KB
- Stars: 23
- Watchers: 2
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svelte-webpack-mpa
## Boilerplate
This template is built for multi-page application(MPA). If you want to create a new project with SPA, see [template-webpack](https://github.com/sveltejs/template-webpack) or [webpack_svelte](https://github.com/theartkod/webpack_svelte).
## Usage
To create a new project based on this template using degit:
```shell
npx degit brandonxiang/svelte-webpack-mpa svelte-app
cd svelte-app
yarn
# or
npm i
```Your static files can be placed into `public` folder.
## Development
```shell
yarn dev
# or
npm run dev
````http://localhost:9000/page1.html` is the first page. `http://localhost:9000/page2.html` is the second page.
## Build
Because of the extremely small bundle size of Svelte App, the common chunk for multi-pages is unneccessary to build. Each page has its own js bundle, or you can change webpack config by yourself.
```shell
yarn build
# or
npm run build
```## Analyze
```shell
yarn analyze
# or
npm run analyze
```## Preprocess
Preprocess is the most interesting API of svelte. Therefore, [svelte-preprocess](https://github.com/kaisermann/svelte-preprocess) is included in the project. Postcss is essential for autoprefixer. Other style preprocessers, like sass, could be setted by yourself.
## How to integate with vscode?
[OFFICAL INTEGRATIONS](https://github.com/sveltejs/eslint-plugin-svelte3/blob/master/INTEGRATIONS.md)
## Changelog
- babel is not essential. So we remove babel-loader
## LICENSE
[MIT](./LICENSE) @brandonxiang