-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
43 lines (36 loc) · 987 Bytes
/
webpack.config.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
//require our dependencies
var path = require('path');
var webpack = require('webpack');
module.exports = {
//the base directory (absolute path) for resolving the entry option
context: __dirname,
entry: ['./src/app'],
output: {
path: path.resolve('./build/'),
filename: "bundle.js"
},
plugins: [],
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
}
]
},
resolve: {
//tells webpack where to look for modules
modulesDirectories: ['node_modules'],
//extensions that should be used to resolve modules
extensions: ['', '.js', '.jsx']
},
devtool: 'source-map'
};