2016-03-15 23:42:10 +01:00
|
|
|
var path = require('path');
|
|
|
|
var webpack = require('webpack');
|
2016-08-17 14:27:37 +02:00
|
|
|
var Dashboard = require('webpack-dashboard');
|
|
|
|
var DashboardPlugin = require('webpack-dashboard/plugin');
|
|
|
|
var dashboard = new Dashboard();
|
2016-03-15 23:42:10 +01:00
|
|
|
|
|
|
|
module.exports = {
|
2016-09-15 22:04:15 +02:00
|
|
|
devtool: 'eval',
|
|
|
|
entry: [
|
|
|
|
'webpack-dev-server/client?http://localhost:3000',
|
|
|
|
'./assets/scripts/src/choices'
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, 'dist'),
|
|
|
|
filename: 'choices.min.js',
|
|
|
|
publicPath: '/assets/scripts/dist/',
|
2016-10-18 15:15:00 +02:00
|
|
|
library: 'Choices',
|
|
|
|
libraryTarget: 'umd',
|
|
|
|
umdNamedDefine: true
|
2016-09-15 22:04:15 +02:00
|
|
|
},
|
|
|
|
eslint: {
|
|
|
|
configFile: '.eslintrc'
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new DashboardPlugin(dashboard.setData),
|
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'process.env': {
|
|
|
|
'NODE_ENV': JSON.stringify('development')
|
|
|
|
}
|
|
|
|
})
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
loaders: [{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /(node_modules|bower_components)/,
|
|
|
|
loaders: ['babel', 'eslint-loader'],
|
|
|
|
include: path.join(__dirname, 'assets/scripts/src')
|
|
|
|
}]
|
|
|
|
}
|
2016-10-18 15:15:00 +02:00
|
|
|
};
|