-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (34 loc) · 901 Bytes
/
webpack.config.js
File metadata and controls
35 lines (34 loc) · 901 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
var path = require('path');
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
var historyApiFallback = require('connect-history-api-fallback')
module.exports = {
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['react', 'es2015', 'stage-0']
}
}
],
},
entry: './src/main.js',
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/build/'
},
plugins: [
new BrowserSyncPlugin(
{
host: 'localhost',
port: 3000,
server: {},
middleware: [ historyApiFallback ]
}
)
],
devtool: "source-map"
};