diff --git a/src/main.ts b/src/main.ts index 29cfdb20b..1a6eec68f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,4 +8,8 @@ if (environment.production) { enableProdMode(); } -platformBrowserDynamic().bootstrapModule(AppModule); +platformBrowserDynamic() + .bootstrapModule(AppModule, { + preserveWhitespaces: false + }) + .catch(err => console.error(err)); diff --git a/tsconfig.json b/tsconfig.json index 1751fa6a0..5666e9251 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, - "allowJs": true, + "allowJs": false, "target": "es5", "paths": { "environments": [ diff --git a/webpack.config.js b/webpack.config.js index 18a290c9b..a40e6870c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,7 +10,7 @@ const ConcatPlugin = require('webpack-concat-plugin'); const { NoEmitOnErrorsPlugin, LoaderOptionsPlugin, DefinePlugin, HashedModuleIdsPlugin } = require('webpack'); const { GlobCopyWebpackPlugin, BaseHrefWebpackPlugin, InsertConcatAssetsWebpackPlugin } = require('@angular/cli/plugins/webpack'); const { CommonsChunkPlugin, UglifyJsPlugin } = require('webpack').optimize; -const { AotPlugin } = require('@ngtools/webpack'); +const { AngularCompilerPlugin } = require('@ngtools/webpack'); const nodeModules = path.join(process.cwd(), 'node_modules'); const entryPoints = ["inline", "polyfills", "sw-register", "styles", "vendor", "main"]; @@ -165,7 +165,8 @@ if(scripts.length > 0){ "hashDigestLength": 4 })); - plugins.push(new AotPlugin({ + plugins.push(new AngularCompilerPlugin({ + entryModule: "src/app/app.module#AppModule", "mainPath": "main.ts", "hostReplacementPaths": { "environments/index.ts": "environments/index.prod.ts"