Build Settings
Settings related to the build settings are specified in the local.yml or local-development.yml or local-production.yml.
The initial value is set to the information you answered in the CLI dialog.
wsDir.xxx#
A working directory in the src directory.
You cannot change src.
wsDir.static#
Default: static
Copy the file as is to the output destination.
If a directory exists, the entire directory is copied.
However, it does not copy files that begin with an underscore and dot prefix.
wsDir.html#
Default: html
A working directory for HTML template engines.
wsDir.css#
Default: css
A working directory for CSS languages.
wsDir.js#
Default: js
A working directory for JavaScript preprocessors and frameworks.
wsDir.img#
Default: img
A place to put images when using file-loader (webpack).
wsDir.yaml2json#
Default: yaml2json
A working directory for converting YAML files to json files.
outputDir#
Default: dist
Build output directory.
deployDir.xxx#
Output destinations by language.
The output destination hierarchy is specified by an array.
e.g. dist/common/css is ['common', 'css']
However, the root of HTML and Pug is in wsDir.html.
e.g.
src/html/index.pug => dist/index.html
src/html/foo/bar.pug => dist/foo/bar.html
deployDir.css#
Default: ['common', 'css']
Output destination for CSS language.
deployDir.js#
Default: ['common', 'js']
Output destination for JavaScript preprocessors and frameworks.
deployDir.img#
Default: ['common', 'img']
Output destination when images are built using file-loader (webpack).ss
deployDir.json#
Default: ['common', 'data']
Output destination for Yaml2Json.
Build options#
Optional settings for building with Webpack.
options.html.minify#
Default: false
options.pug.php#
Default: false
Output as a PHP file at build time.
e.g. index.pug => index.php
options.pug.lint#
Default: '.pug-lintrc.json'
Path to Pug's Lint configuration file from the project root.
options.pug.vuePugLint#
Default: 'config-vue/.pug-lintrc.json'
Pug's Lint configuration file path that can only be set in Vue.js components.
options.css.minify#
Default: false
options.css.postcss.mqpacker#
Default: true
Using node-css-mqpacker.
options.css.postcss.autoprefixer#
Default: undefined
Autoprefixer option.
Using autoprefixer.
If setting e.g.
options.js.minify#
Default: false
options.js.teaser#
Default:
Using Terser plugin if minify is true.
options.js.splitFilename#
Default: 'assets'
File names that combine the same logic.
options.js.sourceMap#
Default: false
options.js.eslint#
Default: undefined
Path of the ESLint configuration file to check when building webpack.
If it is not set, Lint will not be executed.
options.js.tsconfig#
Default: 'tsconfig.json'
Path of the TypeScript configuration file to check when building webpack.
options.json.minify#
Default: false
options.imagemin#
Default:
Using image-minimizer-webpack-plugin.
Default built-in plugins is imagemin-gifsicle, imagemin-jpegtran, imagemin-optipng, imagemin-svgo.
If you want to change it, install the plugin and set the plugin options.
If you do not use it, delete option.imagemin.
file-loader options#
Settings for using file-loader.
The use option specifies whether to use the file-loader.
The hash option specifies whether to insert a 6-digit hash value after image files for cache protection.
options.fileLoader.html.use#
Default: true
options.fileLoader.html.hash#
Default: true
options.fileLoader.html.target#
Default:
See reference of html-loader#attributes.
options.fileLoader.css.use#
Default: true
options.fileLoader.css.hash#
Default: true
options.fileLoader.js.use#
Default: true
options.fileLoader.js.hash#
Default: true
options.fileLoader.vue.use#
Default: true
options.fileLoader.vue.loader#
Default:
See reference of vue-loader#transformAssetUrls.
overrideEnv#
Default: undefined
For example, if you set NODE_ENV=foo, you can use overrideEnv: development to change the build-mode to develop because the build-mode of webpack does not have foo.