diff --git a/packages/@angular/cli/blueprints/ng/files/__path__/tsconfig.spec.json b/packages/@angular/cli/blueprints/ng/files/__path__/tsconfig.spec.json index 5dc8eeb57474..4184bade7fcc 100644 --- a/packages/@angular/cli/blueprints/ng/files/__path__/tsconfig.spec.json +++ b/packages/@angular/cli/blueprints/ng/files/__path__/tsconfig.spec.json @@ -9,6 +9,7 @@ "experimentalDecorators": true, "lib": [ "es2016" + "dom" ],<% } %> "outDir": "<%= relativeRootPath %>/out-tsc/spec", "module": "commonjs", @@ -18,11 +19,5 @@ "jasmine", "node" ] - }, - "files": [ - "test.ts" - ], - "include": [ - "**/*.spec.ts" - ] + } } diff --git a/packages/@angular/cli/blueprints/ng/files/__path__/typings.d.ts b/packages/@angular/cli/blueprints/ng/files/__path__/typings.d.ts index edc2f1e52bd4..ef5c7bd62057 100644 --- a/packages/@angular/cli/blueprints/ng/files/__path__/typings.d.ts +++ b/packages/@angular/cli/blueprints/ng/files/__path__/typings.d.ts @@ -1,4 +1,5 @@ /* SystemJS module definition */ -declare var module: { +declare var module: NodeModule; +interface NodeModule { id: string; -}; +} diff --git a/packages/@angular/cli/models/webpack-test-config.ts b/packages/@angular/cli/models/webpack-test-config.ts index d7d3e81b7dd1..a5b9049f62db 100644 --- a/packages/@angular/cli/models/webpack-test-config.ts +++ b/packages/@angular/cli/models/webpack-test-config.ts @@ -28,6 +28,7 @@ export class WebpackTestConfig extends NgCliWebpackConfig { ]; this.config = webpackMerge(webpackConfigs); + delete this.config.entry; // Remove any instance of CommonsChunkPlugin, not needed with karma-webpack. this.config.plugins = this.config.plugins.filter((plugin: any) => diff --git a/packages/@ngtools/webpack/src/extract_i18n_plugin.ts b/packages/@ngtools/webpack/src/extract_i18n_plugin.ts index 06168b9b3f24..be7ec112beb3 100644 --- a/packages/@ngtools/webpack/src/extract_i18n_plugin.ts +++ b/packages/@ngtools/webpack/src/extract_i18n_plugin.ts @@ -46,7 +46,8 @@ export class ExtractI18nPlugin implements Tapable { if (!options.hasOwnProperty('tsConfigPath')) { throw new Error('Must specify "tsConfigPath" in the configuration of @ngtools/webpack.'); } - this._tsConfigPath = options.tsConfigPath; + // TS represents paths internally with '/' and expects the tsconfig path to be in this format + this._tsConfigPath = options.tsConfigPath.replace(/\\/g, '/'); // Check the base path. const maybeBasePath = path.resolve(process.cwd(), this._tsConfigPath); diff --git a/packages/@ngtools/webpack/src/plugin.ts b/packages/@ngtools/webpack/src/plugin.ts index 2addb6a29018..055c675ccee3 100644 --- a/packages/@ngtools/webpack/src/plugin.ts +++ b/packages/@ngtools/webpack/src/plugin.ts @@ -96,7 +96,8 @@ export class AotPlugin implements Tapable { if (!options.hasOwnProperty('tsConfigPath')) { throw new Error('Must specify "tsConfigPath" in the configuration of @ngtools/webpack.'); } - this._tsConfigPath = options.tsConfigPath; + // TS represents paths internally with '/' and expects the tsconfig path to be in this format + this._tsConfigPath = options.tsConfigPath.replace(/\\/g, '/'); // Check the base path. const maybeBasePath = path.resolve(process.cwd(), this._tsConfigPath); diff --git a/tests/e2e/tests/lint/lint-with-exclude.ts b/tests/e2e/tests/lint/lint-with-exclude.ts index bcf193acc692..41084e6f7b95 100644 --- a/tests/e2e/tests/lint/lint-with-exclude.ts +++ b/tests/e2e/tests/lint/lint-with-exclude.ts @@ -7,6 +7,7 @@ export default function () { return Promise.resolve() .then(() => ng('set', 'lint.0.exclude', '"**/foo.ts"')) + .then(() => ng('set', 'lint.1.exclude', '"**/foo.ts"')) .then(() => writeFile(fileName, 'const foo = "";\n')) .then(() => ng('lint')) .then(({ stdout }) => {