forked from Choices-js/Choices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
40 lines (39 loc) · 1011 Bytes
/
webpack.config.dev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var path = require('path');
var webpack = require('webpack');
var Dashboard = require('webpack-dashboard');
var DashboardPlugin = require('webpack-dashboard/plugin');
var dashboard = new Dashboard();
module.exports = {
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/',
library: 'Choices',
libraryTarget: 'umd',
},
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')
}]
}
};