Webpack 4 boilerplate with pug/stylus/es6 multiple pages
- In project folder run in console
git clone https://github.com/maximzhurkin/html-multipage-boilerplate.git . && rm -rf .git
- Install node modules
npm i
- npm run dev
- npm run favicon
- npm run build
- npm run pack
- Change list fonts in ./layouts/page.pug
- Change list fonts in ./components/app/config.styl
- Create icon.svg file 260x260 in src/static/favicon
- update info in faviconDescription.json (design.safariPinnedTab.themeColor & design.androidChrome.manifest.name)
- npm run favicon
- @import "../../styles/animations/float"
- animation float .25s infinite
- npm i svg-sprite-loader@5 --save-dev
- create folder src/static/icons
- webpack.config.js
const SpriteLoaderPlugin = require('svg-sprite-loader/plugin');
{
test: /\.svg$/,
exclude: [path.resolve('node_modules')],
loader: 'svg-sprite-loader',
options: {
extract: true,
spriteFilename: './assets/images/icons.svg',
runtimeCompat: true
}
},
{
// test: /\.(png|jpg|gif|svg)$/,
exclude: [path.resolve('src/static/icons')],
// loader: 'file-loader',
// options: {
// name: 'assets/images/[name].[ext]'
// }
},
// ...
plugins: [
// ...pluginsOptions,
new SpriteLoaderPlugin({
plainSprite: true
}),
]