-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.shared.js
56 lines (55 loc) · 1.4 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
const path = require("path");
const webpack = require("webpack");
const glob = require('glob');
module.exports = {
config: {
entry: {
'root': ['babel-polyfill', './static/js/entry/root'],
'error': ['babel-polyfill', './static/js/entry/error'],
'style': "./static/js/entry/style"
},
module: {
rules: [
{
test: /\.(png|svg|ttf|woff|woff2|eot|gif)$/,
use: 'url-loader'
},
]
},
resolve: {
modules: [
path.join(__dirname, "static/js"),
"node_modules"
],
extensions: ['.js', '.jsx'],
alias: {
'videojs-contrib-hls': path.resolve(__dirname, 'node_modules/videojs-contrib-hls/dist/videojs-contrib-hls.js'),
'videojs-contrib-quality-levels': path.resolve(__dirname, 'node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.js'),
}
},
performance: {
hints: false
}
},
babelSharedLoader: {
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
"presets": [
["env", { "modules": false }],
"react",
],
"ignore": [
"node_modules/**"
],
"plugins": [
"transform-flow-strip-types",
"react-hot-loader/babel",
"transform-object-rest-spread",
"transform-class-properties",
"syntax-dynamic-import",
]
}
},
};