mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Enable server-side prerendering in React+Redux template
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var merge = require('extendify')({ isDeep: true, arrays: 'concat' });
|
||||
var devConfig = require('./webpack.config.dev');
|
||||
var prodConfig = require('./webpack.config.prod');
|
||||
var isDevelopment = process.env.ASPNET_ENV === 'Development';
|
||||
var extractCSS = new ExtractTextPlugin('site.css');
|
||||
|
||||
module.exports = merge({
|
||||
resolve: {
|
||||
@@ -12,11 +14,12 @@ module.exports = merge({
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.ts(x?)$/, include: /ClientApp/, loader: 'babel-loader' },
|
||||
{ test: /\.ts(x?)$/, include: /ClientApp/, loader: 'ts-loader' }
|
||||
{ test: /\.ts(x?)$/, include: /ClientApp/, loader: 'ts-loader' },
|
||||
{ test: /\.css/, loader: extractCSS.extract(['css']) }
|
||||
]
|
||||
},
|
||||
entry: {
|
||||
main: ['./ClientApp/boot.tsx'],
|
||||
main: ['./ClientApp/boot-client.tsx'],
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, 'wwwroot', 'dist'),
|
||||
@@ -24,6 +27,7 @@ module.exports = merge({
|
||||
publicPath: '/dist/'
|
||||
},
|
||||
plugins: [
|
||||
extractCSS,
|
||||
new webpack.DllReferencePlugin({
|
||||
context: __dirname,
|
||||
manifest: require('./wwwroot/dist/vendor-manifest.json')
|
||||
|
||||
Reference in New Issue
Block a user