-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
40 lines (31 loc) · 780 Bytes
/
webpack.config.js
File metadata and controls
40 lines (31 loc) · 780 Bytes
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
'use strict';
const path = require('path');
const SRC_DIR = path.resolve(__dirname, 'src');
const BUILD_DIR = path.resolve(__dirname, 'build');
const config = {
context: SRC_DIR,
devtool: '#cheap-module-eval-source-map',
// Needed for WriteFilePlugin to work
devServer: {outputPath: BUILD_DIR},
plugins: [],
entry: {
mines: ['./mines.react.js']
},
output: {
path: BUILD_DIR,
filename: '[name]-bundle.js',
publicPath: '/build/'
},
externals: {},
module: {
loaders: [{
test: /\.jsx?$/,
loader: 'babel-loader',
include: SRC_DIR,
query: {
presets: ['es2015', 'react']
}
}]
}
};
module.exports = config;