-
Notifications
You must be signed in to change notification settings - Fork 561
Expand file tree
/
Copy pathwebpack.production.config.js
More file actions
44 lines (41 loc) · 929 Bytes
/
webpack.production.config.js
File metadata and controls
44 lines (41 loc) · 929 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
36
37
38
39
40
41
42
43
44
module.exports = {
entry: {
app: ["./src/index.jsx"]
},
output: {
path: __dirname + "/lib",
filename: "app.js",
library: 'ReactFormBuilder',
libraryTarget: 'umd',
},
externals: {
//don't bundle the 'react' npm package with our bundle.js
//but get it from a global 'React' variable
'react': 'react',
'react-dom': 'react-dom',
'react-datepicker': 'react-datepicker',
'react/addons': 'react/addons',
'classnames': 'classnames',
'jquery': 'jquery',
'bootstrap': 'bootstrap'
},
module: {
loaders: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
},
{
test: /\.scss$/,
loader: "style-loader!css-loader!sass-loader"
}
]
},
resolve: {
extensions: ['', '.js', '.json', '.jsx', '.css', '.scss']
}
}