我无法修复下一个错误:构建用于生产的项目时,构建成功。但是,当我使用param --prod构建项目时,它会失败。 像这样的错误:
in node_modules\ng-zorro-antd\antd.d.ts.ɵep.html(1,999): : Object is possibly 'null'.
我的TSlint设置是:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strict": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
],
"removeComments": true
},
"exclude": [
"node_modules",
"**/*.spec.ts",
"**/*.ts.ɵin.html"
]
}
我试图将node_modules文件夹添加到“ exclude”,但它不起作用。