-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
39 lines (37 loc) · 974 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
const path = require("path");
const taker = path.join(__dirname, "client/taker");
const creater = path.join(__dirname, "client/creater");
const DIST_DIR = path.join(__dirname, "client/dist");
const NODE_ENV = process.env.NODE_ENV || "development";
module.exports = {
// mode: NODE_ENV, // mode defined when started from package.json
entry: {
taker: taker,
creater: creater
},
output: {
path: DIST_DIR,
filename: "[name].bundle.js"
},
module: {
rules: [
{
test: /\.(jsx?|ts)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: [
["@babel/preset-env", { targets: "> 0.25%, not dead" }],
"@babel/preset-react"
],
plugins: [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-react-constant-elements"
]
}
}
}
]
}
};