-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (39 loc) · 903 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
// const OpenBrowserPlugin = require('open-browser-webpack-plugin');
const path = require('path');
module.exports = {
entry: `${path.resolve(__dirname, 'src')}/index.js`,
module: {
loaders: [
{
loaders: ['style-loader', 'css-loader'],
test: /\.(css|png)$/,
},
{
exclude: /node_modules/,
include: path.join(__dirname, 'src'),
loader: 'babel-loader',
query: {
presets: ['react', 'es2015'],
},
test: /\.jsx?$/,
},
],
},
devtool: 'source-map',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'public'),
publicPath: '/public',
},
resolve: {
extensions: ['.webpack.js', '.js', '.jsx'],
},
devServer: {
contentBase: path.join(__dirname, 'public'),
compress: true,
port: 3000,
proxy: {
'/api': 'http://localhost:1235',
},
},
};