zat-glove
v1.0.2
Published
ZhongAn Health FE Packing Tool.
Downloads
3
Readme
za-customercenter-glove
config
module.exports = {
// 同webpack context
contextPath: __dirname,
// 模版路径,参考contextPath
templatePath: './client/views',
// 根路由默认路径;根路由默认重定向;
// 优先级 defaultRedirect > defaultEntry
defaultEntry: 'help',
defaultRedirect: '/help',
// 入口配置
// entry 入口文件
// template 使用的html模版,默认为template(必须提供)
// html 是否产出html文件,默认为true
// path 开发时的地址路径
entries: {
mixture: {
entry: './client/modules/mixture/index.js',
template: 'mixture',
},
help: {
entry: './client/modules/help/index.js',
},
error_403: {
entry: './client/modules/error/403.js',
},
error_404: {
entry: './client/modules/error/404.js',
},
error_500: {
entry: './client/modules/error/500.js',
},
},
// configBase|configDev|configBuild
// 暴露配置更改接口,用户二次更改对应环境config
configDev(config, webpack, toolConfig) {
try {
toolConfig.babelOptions.presets.push('react-hmre');
} catch (e) {
console.error('add react-hmre fail', e);
}
},
};
gloveConfig
- contextPath
- assetPath
- viewPath
- publicPath
- extractTextPublicPath
- templatePath
- templateCommonsChunk
- defaultEntry
- defaultRedirect
- styleSourceMap
- uglifyParalle
- entries
- entry
- html
- path
- template
- htmlExt
- isomorphic
- proxy
toolConfig
- gloveConfig
- babelOptions
- tsCompilerOptions
- tsOptions
- cssOptions
- sassOptions
env
- PROGRESS
CUI进度条 - FILTER
选择性编译 - ENTRY/ENTRYFILTER
选择入口/过滤入口(使用‘;’进行分割)
e.g.,ENTRYFILTER=error_403;error_500
- HOST
- PORT
- ALLOW_ISOMORPHIC_PROXY
- DEVTOOLS
- DEBUG 提供给编译环境的同时,也会改变build的特定动作。
- ANALYZER
TODO
- [?] dev server render, bind MemoryFileSystem.