forked from BrownBook/ExperientialLearningInventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.dev.js
52 lines (50 loc) · 1.16 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
const webpack = require('webpack');
const path = require('path');
// var Promise = require("es6-promise").polyfill();
const AssetsPlugin = require('assets-webpack-plugin');
const entryPointList = require(path.join(__dirname, '/entryPoints.js'));
const ESLintPlugin = require('eslint-webpack-plugin');
const JS_DIR = path.resolve(__dirname, 'javascript');
module.exports = {
mode: 'development',
devtool: 'eval-source-map',
entry: entryPointList.entryPoints,
output: {
path: path.join(JS_DIR, 'dist'),
filename: '[name].dev.js',
publicPath: 'javascript/dist/'
},
externals: {
jquery: '$'
},
watchOptions: {
ignored: ['**/node_modules/**', '**/vendor/**']
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
include: JS_DIR,
use: [{ loader: 'babel-loader' }]
},
{
test: /\.css$/,
use: [
{
loader: 'style-loader'
},
{
loader: 'css-loader'
}
]
}
]
},
plugins: [
new ESLintPlugin({ files: 'javascript/**/*.jsx' }),
new AssetsPlugin({
filename: 'assets.json',
prettyPrint: true
})
]
};