Repository navigation
Description
OS?
Windows 8.1
Versions.
v6.5.0
Parts of package.json
"@angular/common": "^2.0.2",
"@angular/compiler": "^2.0.2",
"@angular/compiler-cli": "^2.1.0",
"@angular/core": "^2.0.2",
"@angular/platform-browser": "^2.0.2",
"@angular/platform-browser-dynamic": "^2.0.2",
"@angular/platform-server": "^2.0.2",
"@ngtools/webpack": "^1.1.0",
"@types/chrome": "0.0.35",
"@types/core-js": "^0.9.34",
"@types/filesystem": "0.0.28",
"@types/jquery": "^2.0.33",
"@types/node": "^6.0.45",
"@types/requirejs": "^2.1.28",
"angular-cli": "^1.0.0-beta.17",
"angular2-router-loader": "^0.3.2",
"angular2-template-compiler": "^0.1.9",
"angular2-template-loader": "^0.5.0",
...
"webpack": "^2.1.0-beta.25",
"webpack-manifest-plugin": "^1.0.1",
"webpack-notifier": "^1.4.1",
"webpack-shell-plugin": "^0.4.3",
"webpack-vendor-chunk-plugin": "^1.0.0",
Repro steps.
It's a chrome extension that I created from scratch. It utilized Webpack 1.x at first, then onto Webpack 2.x. It uses TypeScript 2.x.
Basically I am just copying the files from the blacksonic angular2-aot-webpack repo..
His repo still uses ngtools.NgcWebpackPlugin and not AoTPlugin.
He also doesn't use @ngtools/webpack it seems.
test: /\.ts$/,
use: [
'awesome-typescript?tsconfig=tsconfig.json',
'angular2-template'
]
I am using this:
{
test: /\.ts$/,
//exclude: [ /.*\.ngfactory\..*/ ],
use: ["@ngtools/webpack"]
},
The log given by the failure.
Using the following
new ngtools.AotPlugin({
tsConfigPath: './tsconfig.aot.json',
baseDir: path.resolve(__dirname, ''),
entryModule: path.join(__dirname, 'app', 'www', 'starter', 'app', 'main') + '#MainModule'
}),
Builds quickly (less than 5 seconds), but as soon as it finishes building, the watch mode in webpack triggers a recompile, where the below step is taking an incredibly long time the first time. Once this one is done, all the next recompiles are super-quick.
147198ms [0] asset optimization
19574ms [0] emitting
Mention any other details that might be useful.
This is the speed when commenting out the AoTPlugin:
488ms [0] chunk asset optimization
64ms [0] asset optimization
20ms [0] emitting
I have tried to reduce overhead of stuff in my config, but in the end we're talking like 5-10 entries, and barely any plugins..
Activity
qvazzler commentedon Oct 17, 2016
Ok, it turns out, that
copy-webpack-pluginis mostly to blame for the extreme increase in asset optimization.I removed it, and now it's pretty much instant..
Meligy commentedon Oct 17, 2016
You might want to close the issue then ;)
filipesilva commentedon Oct 17, 2016
@qvazzler we also removed it in #2570 for a similar reason, it was affecting some users.
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.