-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (41 loc) · 1021 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
const path = require("path");
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: path.join(__dirname, "client/js", "App.jsx"),
output: {
path: path.join(__dirname, "client-build"),
filename: "bundle.js",
clean: true,
},
mode: process.env.NODE_ENV || "development",
resolve: {
modules: [path.resolve(__dirname, "client"), "node_modules"]
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: "**/*",
to: path.join(__dirname, "client-build"),
context: "client",
globOptions: {
ignore: [
"**/*.jsx",
],
}
},
],
}),
],
};