-
Notifications
You must be signed in to change notification settings - Fork 17
/
webpack.config.shared.js
58 lines (57 loc) · 1.5 KB
/
webpack.config.shared.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const path = require("path");
const webpack = require("webpack");
module.exports = {
config: {
entry: {
'dashboard': ['babel-polyfill', './static/js/entry/dashboard'],
'financial_aid': './static/js/financial_aid/functions',
'public': ['babel-polyfill', './static/js/entry/public'],
'public_jquery': './static/js/entry/public_jquery',
'sentry_client': './static/js/entry/sentry_client.js',
'style': './static/js/entry/style',
'style_public': './static/js/entry/style_public',
'style_certificate': './static/js/entry/style_certificate',
'zendesk_widget': './static/js/entry/zendesk_widget.js',
},
module: {
rules: [
{
test: /\.(svg|ttf|woff|woff2|eot|gif)$/,
use: 'url-loader'
},
]
},
resolve: {
modules: [
path.join(__dirname, "static/js"),
"node_modules"
],
extensions: ['.js', '.jsx'],
},
performance: {
hints: false
}
},
babelSharedLoader: {
test: /\.jsx?$/,
include: [
path.resolve(__dirname, "static/js"),
path.resolve(__dirname, "node_modules/@material-ui"),
],
loader: 'babel-loader',
query: {
"presets": [
["env", { "modules": false }],
"latest",
"react",
],
"plugins": [
"transform-flow-strip-types",
"react-hot-loader/babel",
"transform-object-rest-spread",
"transform-class-properties",
"syntax-dynamic-import",
]
}
},
};