Ensure webpack config is valid

This commit is contained in:
Josh Johnson 2017-11-07 11:59:49 +00:00
parent cc11d6bfd6
commit 487e878b88
5 changed files with 6880 additions and 6389 deletions

View file

@ -54,6 +54,7 @@
"node-sass": "^3.4.2",
"nodemon": "^1.9.1",
"nyc": "^11.0.3",
"open": "0.0.5",
"opn-cli": "^3.1.0",
"postcss-cli": "^2.5.1",
"sinon": "^2.4.0",
@ -66,6 +67,7 @@
"dependencies": {
"classnames": "^2.2.5",
"fuse.js": "^3.1.0",
"opn": "^5.1.0",
"redux": "^3.3.1"
},
"npmName": "choices.js",

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,14 +1,15 @@
var path = require('path');
var webpack = require('webpack');
var Dashboard = require('webpack-dashboard');
var DashboardPlugin = require('webpack-dashboard/plugin');
var dashboard = new Dashboard();
const path = require('path');
const webpack = require('webpack');
const Dashboard = require('webpack-dashboard');
const DashboardPlugin = require('webpack-dashboard/plugin');
const dashboard = new Dashboard();
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'./src/scripts/src/choices'
'./src/scripts/src/choices',
],
output: {
path: path.join(__dirname, 'dist'),
@ -17,24 +18,33 @@ module.exports = {
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')
}
})
NODE_ENV: JSON.stringify('development'),
},
}),
],
module: {
loaders: [{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loaders: ['babel', 'eslint-loader'],
include: path.join(__dirname, 'src/scripts/src')
}]
}
rules: [
{
enforce: 'pre',
test: /\.js?$/,
include: path.join(__dirname, 'src/scripts/src'),
exclude: /(node_modules|bower_components)/,
loader: 'eslint-loader',
query: {
configFile: '.eslintrc',
},
},
{
test: /\.js?$/,
include: path.join(__dirname, 'src/scripts/src'),
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
},
],
},
};