What this preset does:
- Generate
index.html
and relevant assets files - Copy
./static/**
to./dist/**
- CSS preprocessors (Postcss/Sass/Scss/Less/Stylus)
- CSS extraction
- Babel with
babel-preset-latest
- Hot reloading (Live loading fallbacks) in
dev
command - Minimize and optimize in
build
command - Auto-split vendor code and app code in
build
command
yarn add tooling-preset-web --dev
{
"tooling": {
"presets": [
"web"
]
}
}
You can also use options:
{
"tooling": {
"presets": [
["web", {
"entry": "src/index.js"
}]
]
}
}
Type: string
Default: index.js
Entry file.
Type: string
Default: dist
Dist folder.
Type: boolean
Default: true
in build
command
Extract CSS.
Type: boolean
Default: true
in build
command
Generate sourcemaps.
html-webpack-plugin options, the default value is:
{
title: 'Tooling Preset Web: Homepage'
}
Type: boolean
Default: true
in build
command and only work in build
command
Split vendor code and app code.