我正在使用angular 4.4.4
,webpack 3.8.1
,@angular/compiler/cli 4.4.4
(升级后)
使用ncu - npm check updates
升级节点模块包后
我收到此错误
/home/razmjo/workstation/jobsaf-website/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:71 抛出新的错误('必须指定" tsConfigPath"在@ ngtools / webpack的配置中。');
即使我已按照以下方式正确设置tsConfigPath
:
https://github.com/angular/angular-cli/tree/master/packages/%40ngtools/webpack
更新:配置文件(为清晰起见,我删除了很多内容)
const AotPlugin = require('@ngtools/webpack').AotPlugin;
module.exports = function (options) {
return webpackMerge(commonConfig({env: ENV}), {
module: {
rules: [
{
test: /\.ts$/,
loader: '@ngtools/webpack'
},
]
},
plugins: [
new AotPlugin({
tsConfigPath: 'tsconfig.webpack.json',
entryModule: 'src/app.module#AppModule',
sourceMap: true
}),
],
});
}