-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
47 lines (46 loc) · 956 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
38
39
40
41
42
43
44
45
46
47
// eslint-disable-next-line filenames/match-regex
const path = require("path");
module.exports = {
output: {
filename: "bundle.js"
},
optimization: {
splitChunks: {},
runtimeChunk: false
},
externals: {
jsdom: "window",
cheerio: "window",
"react/lib/ExecutionEnvironment": true,
"react/lib/ReactContext": "window",
"react/addons": true
},
module: {
rules: [
{
test: /src\/js\/.+\.js$/,
loader: "babel-loader?plugins=rewire",
query: {
presets: ["react"]
}
},
{
test: /\.(svg|ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/,
loader: require.resolve("file-loader"),
query: {
name: "static/assets/[name].[hash:8].[ext]"
}
}
]
},
resolve: {
alias: {
react: path.resolve("./node_modules/react"),
klassified: path.resolve("./node_modules/klassified/dist/klassified")
},
modules: [
path.resolve(process.cwd(), "src"),
"node_modules"
]
}
};