-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
47 lines (46 loc) · 980 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
43
44
45
46
47
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = {
target: "node",
mode: "production",
entry: "./src/index.ts",
resolve: {
extensions: [".json", ".js", ".ts"],
},
optimization: {
minimize: false,
},
output: {
path: path.join(__dirname, "dist"),
filename: "index.js",
},
module: {
rules: [
{
test: /\.(ts|js)$/,
parser: { amd: false },
exclude: /node_modules/,
loader: "babel-loader",
},
{
test: /\.(m?js|node)$/,
parser: { amd: false },
loader: "@vercel/webpack-asset-relocator-loader",
},
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: "package.json", to: "package.json" },
//{
// from: "node_modules/**/*.node",
// to: "[path][name][ext]",
//}
],
}),
],
externals: {
//"bindings": "commonjs bindings",
}
};