Ich bin ziemlich neu in Front-End-Entwicklung und einige Probleme mit angular2 App.Angular 2 Polyfills Initialisierung dauert zu lange
Wie Sie die Timeline-Capture unten sehen können, polyfills taks zu lange Zeit (fast 6 Sekunden!) Es scheint kein normal. aber ,, ich habe keine Ahnung, was ich tun kann, um diese Polyfill-Zeit zu verringern.
Einige Zeilen des Conf.
// Add build specific plugins
if (ENV === 'build') {
config.plugins.push(
// Reference: http://webpack.github.io/docs/list-of-plugins.html#noerrorsplugin
// Only emit files when there are no errors
new webpack.NoErrorsPlugin(),
// Reference: http://webpack.github.io/docs/list-of-plugins.html#dedupeplugin
// Dedupe modules in the output
new webpack.optimize.DedupePlugin(),
// Reference: http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
// Minify all javascript, switch loaders to minimizing mode
new webpack.optimize.UglifyJsPlugin({
compress: { warnings: false }
})
);
}
Ganze webpack.config.js verwende ich in meiner App. https://gist.github.com/jeesim2/484186d630fedc9f42e264ca905ad123
Meine abgewinkelte Ausführung
"@angular/common": "^2.0.1",
"@angular/compiler": "^2.0.1",
"@angular/core": "^2.0.1",
"@angular/forms": "^2.0.1",
"@angular/http": "^2.0.1",
"@angular/platform-browser": "^2.0.1",
"@angular/platform-browser-dynamic": "^2.0.1",
"@angular/router": "^3.0.1",
webpack.optimize.UglifyJsPlugin verminderte Packungsgröße auf 70%, aber Seite Ladegeschwindigkeit nicht schneller wurde erhalten.
Was verursacht diese lange Seite laden?