mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Update ReactSpa template to match current patterns
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
var isDevBuild = process.argv.indexOf('--env.prod') < 0;
|
||||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var extractCSS = new ExtractTextPlugin('vendor.css');
|
||||
var isDevelopment = process.env.ASPNETCORE_ENVIRONMENT === 'Development';
|
||||
|
||||
module.exports = {
|
||||
resolve: {
|
||||
@@ -10,8 +10,8 @@ module.exports = {
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' },
|
||||
{ test: /\.css/, loader: extractCSS.extract(['css']) }
|
||||
{ test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' },
|
||||
{ test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) }
|
||||
]
|
||||
},
|
||||
entry: {
|
||||
@@ -30,7 +30,7 @@ module.exports = {
|
||||
path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'),
|
||||
name: '[name]_[hash]'
|
||||
})
|
||||
].concat(isDevelopment ? [] : [
|
||||
].concat(isDevBuild ? [] : [
|
||||
new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } })
|
||||
])
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user