-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (36 loc) · 918 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
var path = require("path");
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
module.exports = {
context: __dirname,
entry: "./frontend/main.jsx",
output: {
path: path.join(__dirname, 'app', 'assets', 'javascripts'),
filename: "bundle.js"
},
watch: true,
// plugins: [
// new BrowserSyncPlugin({
// // browse to http://localhost:3000/ during development,
// // ./public directory is being served
// host: 'localhost',
// port: 3000,
// server: { baseDir: [path.join(__dirname, 'app', 'assets', 'javascripts')] }
// })
// ],
module: {
loaders: [
{
test: [/\.jsx?$/, /\.js?$/],
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015', 'react']
}
}
]
},
devtool: 'source-maps',
resolve: {
extensions: ["", ".js", ".jsx" ]
}
};