build web projects by webpack5
webpack-dev-server 最低node版本12.13.0 一些loader 最低node版本14.15.0
alfred-cli-service serve
alfred-cli-service build
alfred-cli-service inspect
alfred.config.js新增plugins配置
// alfred.config.js
module.exports = {
// ...
plugins: [
'./plugin-update-webpack'
]
}
// ./plugin-update-webpack
module.exports = (api, options) => {
api.chainWebpack((webpackConfig) => {
webpackConfig.mode('development')
})
}
1.1.0新增chainWebpack配置项,无需创建插件直接修改
module.exports = {
// ...
chainWebpack: (webpackConfig) => {
webpackConfig.mode('development')
}
}
np模块依赖Node.js 16 or later
npm run pub