Closed simeon49 closed 6 years ago
tsconfig.json 增加下面配置:
"include": [
"src/**/*",
"node_modules/echarts-ng2/src/component/echarts-ng2.module.ts"
]
全部信息:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"include": [
"src/**/*",
"node_modules/echarts-ng2/src/component/echarts-ng2.module.ts"
]
}
执行命令 ng build --prod 时报下面的错误:
node_modules/echarts-ng2/src/component/echarts-ng2.component.ngfactory.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
Versions
Repro steps.
ng build --prod