-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.config.js
33 lines (32 loc) · 894 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
const path = require('path');
const TerserPlugin = require("terser-webpack-plugin");
module.exports = {
entry: "./js/index.ts",
output: {
filename: "scene_presets_panel.js",
path: path.resolve(__dirname, "custom_components/scene_presets/frontend")
},
resolve: {
modules: [path.join(__dirname), 'node_modules'],
extensions: [".webpack.js", ".web.js", ".ts", ".js", ".tsx"]
},
module: {
rules: [
{ test: /\.ts$/, loader: "ts-loader" },
{ test: /\.tsx$/, loader: "ts-loader" },
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
]
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: false,
}),
],
},
mode: "production"
}