我正在尝试执行
webpack --optimize-minimize
在我的Angular2 SPA上并收到以下错误。
WARNING in ./wwwroot/dist/bundle.js from UglifyJs
Side effects in initialization of unused variable OPERATORS [./~/angular2/src/co
re/change_detection/parser/lexer.js:422,0]
Side effects in initialization of unused variable freeExports [./~/rxjs/util/roo
t.js:12,0]
Side effects in initialization of unused variable freeModule [./~/rxjs/util/root
.js:13,0]
Dropping unused variable _CONTEXT_ACCESSOR [./~/angular2/src/core/change_detecti
on/codegen_name_util.js:6,0]
Side effects in initialization of unused variable ViewType [./~/angular2/src/cor
e/linker/view_type.js:12,0]
Dropping unused variable __unused [./~/angular2/src/common/pipes/async_pipe.js:3 ...
我的webpack.config.js就是这个
module.exports = {
"entry": "./Angular/boot",
"output": {
"filename": "./wwwroot/dist/bundle.js"
},
"resolve": {
"extensions": [ '', '.js', '.ts' ]
},
"module": {
"loaders": [
{
"test": /\.ts/,
"loaders": [ 'ts-loader' ],
"exclude": /node_modules/
}
]
}
};
当运行页面时,我得到“超出最大调用堆栈大小”,因此有一些循环引用继续使用缩小的javascript。
帮助表示感谢,非常感谢