diff --git a/packages/angular-cli/blueprints/ng2/files/__path__/tsconfig.json b/packages/angular-cli/blueprints/ng2/files/__path__/tsconfig.json index 731b5d49c7ab..fa3fcc8abcee 100644 --- a/packages/angular-cli/blueprints/ng2/files/__path__/tsconfig.json +++ b/packages/angular-cli/blueprints/ng2/files/__path__/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "baseUrl": "", "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, diff --git a/packages/webpack/src/plugin.ts b/packages/webpack/src/plugin.ts index 4692231cbbec..e0ff548e834f 100644 --- a/packages/webpack/src/plugin.ts +++ b/packages/webpack/src/plugin.ts @@ -282,7 +282,7 @@ export class AotPlugin { .map(route => { const mr = ModuleRoute.fromString(route); const relativePath = this._resolveModulePath(mr, relativeModulePath); - const absolutePath = path.join(this.genDir, relativePath); + const absolutePath = path.resolve(this.genDir, relativePath); return { moduleRoute: mr, moduleRelativePath: relativePath, diff --git a/tests/e2e/tests/misc/lazy-module.ts b/tests/e2e/tests/misc/lazy-module.ts index ad7b4cfab6ac..4fff6b80ae04 100644 --- a/tests/e2e/tests/misc/lazy-module.ts +++ b/tests/e2e/tests/misc/lazy-module.ts @@ -6,18 +6,14 @@ import {addImportToModule} from '../../utils/ast'; export default function(argv: any) { - /** This test is disabled when not on nightly. */ - if (!argv.nightly) { - return Promise.resolve(); - } - let oldNumberOfFiles = 0; return Promise.resolve() .then(() => ng('build')) .then(() => oldNumberOfFiles = readdirSync('dist').length) .then(() => ng('generate', 'module', 'lazy', '--routing')) .then(() => addImportToModule('src/app/app.module.ts', oneLine` - RouterModule.forRoot([{ path: "lazy", loadChildren: "app/lazy/lazy.module#LazyModule" }]) + RouterModule.forRoot([{ path: "lazy", loadChildren: "app/lazy/lazy.module#LazyModule" }]), + RouterModule.forRoot([{ path: "lazy1", loadChildren: "./lazy/lazy.module#LazyModule" }]) `, '@angular/router')) .then(() => ng('build')) .then(() => readdirSync('dist').length)