Я пытаюсь установить приложение Angular 2, но у меня есть:
Не удалось разрешить app / components / xxx / xxxxx.component из xxxx \ wwwroot \ angular \ app \ app.module.js
В app.module есть ссылка на xxxxx.component
, например:
import { xxxxx } from 'app/components/xxx/xxxxx.component'
поэтому в tsconfig.js есть:
"compilerOptions": {
...
"paths": {
"app/*": [ "./app/*" ],
...
},
"outDir": "wwwroot",
...
},
Как я могу разрешить псевдонимы пути, такие как машинописный текст в свертке?
Я пробовал с
1) https://github.com/frostney/rollup-plugin-alias
rollup-config.js:
export default {
entry: 'wwwroot/angular/app/main-aot.js',
dest: 'wwwroot/dist/build.js',
sourceMap: false,
format: 'iife',
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: 'node_modules/rxjs/**',
}),
alias({
'app': '.' // asuming "wwwroot/angular/app/" is the working dir
}),
uglify()
]
}
2) https://github.com/dot-build/rollup-plugin-includepaths < / а>
rollup-config.js:
let includePathOptions = {
include: {},
paths: ['../'], // asuming "wwwroot/angular/app/" is the working dir
external: [],
extensions: ['.js']
};
export default {
entry: 'wwwroot/angular/app/main-aot.js',
dest: 'wwwroot/dist/build.js',
sourceMap: false,
format: 'iife',
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: 'node_modules/rxjs/**',
}),
includePaths(includePathOptions),
uglify()
]
}
Но ничего из этого не работает. Любая идея? Заранее спасибо!!!