【发布时间】:2019-12-30 19:12:27
【问题描述】:
生产构建后如何保留源地图?
现在,我的命令如下所示:
"build-prod": "ng build --app=release -prod && cp -R lang dist"
我尝试将其更改为:
ng build --app=release --sourceMap=true -prod && cp -R lang dist
但没有任何改变。
如果我这样做:
ng build --sourcemap 我得到了 sourcemaps 但后来得到的是 index.html 而不是 index.prod.html。
是否可以编辑第一个命令来构建源映射文件?
这是我的tsconfig.json 文件:
{
"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"
]
}
}
【问题讨论】:
标签: javascript node.js angular typescript angular-cli