mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Tweak ReactGrid's Webpack config in preparation for use of dev middleware
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: './ReactApp/boot-client.jsx',
|
||||
output: {
|
||||
path: './wwwroot',
|
||||
filename: 'bundle.js'
|
||||
devtool: 'eval-source-map',
|
||||
resolve: {
|
||||
extensions: [ '', '.js', '.jsx' ]
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/, query: { presets: ['es2015', 'react'] } },
|
||||
{ test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ },
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||
{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' }
|
||||
]
|
||||
},
|
||||
entry: {
|
||||
main: ['./ReactApp/boot-client.jsx']
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, '/wwwroot/dist'),
|
||||
filename: '[name].js',
|
||||
publicPath: '/dist/' // Tells webpack-dev-middleware where to serve the dynamically compiled content from
|
||||
},
|
||||
plugins: [
|
||||
new ExtractTextPlugin('main.css')
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user