jsketcher/webpack.config.js
2016-09-08 20:51:30 -07:00

29 lines
788 B
JavaScript

const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: {
index: ['./web/app/index', 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server' ],
sketcher: ['./web/app/sketcher', 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server' ]
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].bundle.js',
chunkFilename: '[id].bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
include: path.join(__dirname, 'web/app')
}, {
test: /\.css$/,
loader: 'style-loader!css-loader'
}]
}
};