forked from Risto-Stevcev/bs-declaredom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.jsx.js
38 lines (36 loc) · 914 Bytes
/
webpack.config.jsx.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
var path = require('path');
var dir_js = path.resolve(__dirname, 'lib/es6_global/example');
var dir_build = path.resolve(__dirname, 'dist');
module.exports = {
entry: path.resolve(dir_js, 'TryJsx.bs.js'),
output: {
path: dir_build,
filename: 'bundle.webpack.jsx.js'
},
devServer: {
contentBase: dir_build,
},
module: {
rules: [
{
sideEffects: false,
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-proposal-object-rest-spread']
}
}
}
]
},
stats: {
// Nice colored output
colors: true
},
mode: 'production',
// Create source maps for the bundle
devtool: 'source-map',
};