-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
31 lines (30 loc) · 914 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
const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
mode: "development",
devtool: "source-map",
entry: {index: "./src/main/js/index.js"},
output: {
path: path.resolve(__dirname, "./target/classes/static/app"),
filename: "[name].bundle.js",
publicPath: "/app/"
},
module: {
rules: [
{
test: path.join(__dirname, "."),
exclude: /(node_modules)/,
use: [{
loader: "babel-loader",
options: {
presets: ["@babel/preset-env", "@babel/preset-react"]
}
}]
}, {
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader"]
}
]
},
plugins: [new MiniCssExtractPlugin()]
};