-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
52 lines (50 loc) · 993 Bytes
/
webpack.config.js
File metadata and controls
52 lines (50 loc) · 993 Bytes
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
48
49
50
51
52
const dotenv = require("dotenv-webpack");
module.exports = {
resolve: {
fallback: {
"crypto": false,
"zlib": false,
"buffer": false,
"assert": false,
"constants": false,
},
},
externals: {
'node:fs': 'commonjs2 node:fs',
'node:buffer': 'node:buffer',
'node:https': 'node:https',
'node:http': 'node:http',
'node:net': 'node:net',
'node:path': 'node:path',
'node:process': 'node:process',
'node:stream/web': 'node:stream/web',
'node:stream': 'node:stream',
'node:url': 'node:url',
'node:util': 'node:util',
'node:zlib': 'node:zlib',
},
node: { global: true },
output: {
libraryTarget: "umd",
},
module: {
rules: [
{
test: /\.html$/,
use: "raw-loader",
},
{
test: /\.txt$/,
use: "raw-loader",
},
],
},
optimization: {
minimize: false
},
plugins: [
new dotenv({
systemvars: true,
}),
],
};