-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.cli.config.js
42 lines (41 loc) · 1.01 KB
/
webpack.cli.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 TerserPlugin = require("terser-webpack-plugin")
module.exports = {
entry: "./src/measurement/services/worker.service.ts",
output: {
path: path.join(__dirname, "src/measurement/services"),
filename: "worker.service.js",
},
target: "node",
node: {
__dirname: false,
},
module: {
rules: [
{
test: /\.node$/,
loader: "node-loader",
},
{
test: /\.tsx?$/,
exclude: /(node_modules|\.webpack)/,
use: {
loader: "ts-loader",
options: {
transpileOnly: true,
},
},
},
],
},
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
}),
],
},
resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".css", ".json"],
},
}