这是我的文件夹结构
/js
/dev
/admin
app.component.ts
/public
tsconfig.json
这是我的tsconfig.json文件
{
"compilerOptions": {
"target": "ES5",
"module": "system",
"moduleResolution": "node",
"outDir": "./js/public",
"rootDir": "./js/dev",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules"
]
}
问题是编译后的结构是:
/js
/dev
/admin
app.component.ts
/public
/js
/dev
/admin
app.component.js
tsconfig.json
我想要
/js
/dev
/admin
app.component.ts
/public
/admin
app.component.js
tsconfig.json
答案 0 :(得分:1)
tsconfig.json
移至'/js/dev/'
outDir
媒体资源修改为'../public'