fix/ Replace AotPlugin to AngularCompilerPlugin
This commit is contained in:
@@ -8,4 +8,8 @@ if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic()
|
||||
.bootstrapModule(AppModule, {
|
||||
preserveWhitespaces: false
|
||||
})
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowJs": true,
|
||||
"allowJs": false,
|
||||
"target": "es5",
|
||||
"paths": {
|
||||
"environments": [
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user