@best-shot/preset-web
v0.15.5
Published
A `best-shot` preset for web project
Downloads
556
Maintainers
Readme
@best-shot/preset-web
A best-shot
preset for web project.
This preset includes the following packages:
- micro-tpl-loader
- html-webpack-plugin
- html-add-asset-webpack-plugin
- html-minimizer-webpack-plugin
- webpack-subresource-integrity
Installation
npm install @best-shot/preset-web --save-dev
Usage
// example: .best-shot/config.mjs
export const config = {
presets: ['web'],
html: {
// See: https://github.com/jantimon/html-webpack-plugin#options
}
};
Options
// example: .best-shot/config.mjs
export const config = {
presets: ['web'],
vendors: {
// Split Chunks
common: ['lodash', 'axios']
},
html: [
// Multiple Page Application
{
filename: './src/index.html',
title: 'Hello world!'
},
{
filename: './src/intro.html'
}
]
};
Tips
Polyfill
This preset use global
as options.babel.polyfill
.
See Options in @best-shot/preset-babel