Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.1.1
node: 6.10.0
os: win32 x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/upgrade: 4.1.3
@angular/cli: 1.1.1
@angular/compiler-cli: 4.1.3
@angular/language-service: 4.1.3
Repro steps.
- ng new some-project
- Update tsconfig.app.js to include a
paths entry to some modules, one with a parent relative path and one without.
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"baseUrl": "",
"types": [
"angular"
],
"paths": {
"@plugins/*": ["../../src/*"],
"@todo/*": ["app/to-do/*"]
}
},
"exclude": [
"test.ts",
"**/*.spec.ts",
"**/bower_components/**/*"
]
}
- Use these new path entries in a route.
export const routes: Routes = [{
// Does not work, likely due to parent relative path in tsconfig
path: 'upf/broken',
loadChildren: '@plugins/to-do/to-do.module#ToDoModule'
}, {
// Works fine
path: 'upf/works',
loadChildren: '@todo/to-do.module#ToDoModule'
}];
- Run
ng serve --prod --aot. Compilation will fail.
The log given by the failure.
ERROR in ./platform/src/$$_gendir async
Module not found: Error: Can't resolve 'D:\temp\arch\my-sessions\src\main\webapp\scripts\platform\src\to-do\to-do.module.ngfactory.ts' in 'D:\temp\arch\my-sessions\src\main\webapp\scripts\platform\src\$$_gendir'
@ ./platform/src/$$_gendir async
@ ./~/@angular/core/@angular/core.es5.js
@ ./platform/src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./platform/src/main.ts
Desired functionality.
I would like to be able to use a parent relative path in tsconfig for module resolution.
Mention any other details that might be useful.
Running without --prod --aot flags works as expected.
Bug Report or Feature Request (mark with an
x)Versions.
@angular/cli: 1.1.1
node: 6.10.0
os: win32 x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/upgrade: 4.1.3
@angular/cli: 1.1.1
@angular/compiler-cli: 4.1.3
@angular/language-service: 4.1.3
Repro steps.
pathsentry to some modules, one with a parent relative path and one without.{ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", "module": "es2015", "baseUrl": "", "types": [ "angular" ], "paths": { "@plugins/*": ["../../src/*"], "@todo/*": ["app/to-do/*"] } }, "exclude": [ "test.ts", "**/*.spec.ts", "**/bower_components/**/*" ] }ng serve --prod --aot. Compilation will fail.The log given by the failure.
Desired functionality.
I would like to be able to use a parent relative path in tsconfig for module resolution.
Mention any other details that might be useful.
Running without
--prod --aotflags works as expected.