jsketcher/webpack.config.js
2017-04-13 00:59:14 -07:00

44 lines
980 B
JavaScript

const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: {
index: ['babel-polyfill', './web/app/index'],
sketcher: ['babel-polyfill', './web/app/sketcher']
},
output: {
path: path.join(__dirname, 'dist/static'),
filename: '[name].bundle.js',
chunkFilename: '[id].bundle.js',
publicPath: '/static/'
},
externals: {
'verb-nurbs': 'verb'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
include: [path.join(__dirname, 'web/app'), path.join(__dirname, 'web/test')]
}, {
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.less$/,
loader: "style!css?-url!less"
},
{
test: /\.html$/,
loader: 'handlebars?helperDirs[]=' + __dirname + '/web/app/ui/helpers'
},
{
test: /\.json$/,
loader: 'json'
}]
}
};