mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 19:17:30 +00:00
In Angular 2 template, always load CSS via ExtractTextPlugin (otherwise you get a bad FOUC when loading server-prerendered page)
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var extractCSS = new ExtractTextPlugin('site.css');
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.css/, exclude: /ClientApp/, loader: extractCSS.extract(['css']) },
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
extractCSS,
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
minimize: true,
|
||||
mangle: false // Due to https://github.com/angular/angular/issues/6678
|
||||
|
||||
Reference in New Issue
Block a user