FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
serverless-dns/webpack.config.cjs at main · W3Dev/serverless-dns · GitHub
W3Dev
/
serverless-dns
Public
forked from
serverless-dns/serverless-dns
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
serverless-dns
/
webpack.config.cjs
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (51 loc) · 1.56 KB
Breadcrumbs
serverless-dns
/
webpack.config.cjs
Copy path
File metadata and controls
57 lines (51 loc) · 1.56 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
53
54
55
56
57
const
webpack
=
require
(
"webpack"
)
;
const
NodePolyfillPlugin
=
require
(
"node-polyfill-webpack-plugin"
)
;
// developers.cloudflare.com/workers/cli-wrangler/configuration#modules
// archive.is/FDky9
module
.
exports
=
{
entry
:
"./src/server-workers.js"
,
target
:
[
"webworker"
,
"es2022"
]
,
mode
:
"production"
,
// enable devtool in development
// devtool: 'eval-cheap-module-source-map',
// gist.github.com/ef4/d2cf5672a93cf241fd47c020b9b3066a
resolve
:
{
fallback
:
{
// buffer polyfill: archive.is/7OBM7
buffer
:
require
.
resolve
(
"buffer/"
)
,
}
,
}
,
plugins
:
[
// remove "node:" prefix from imports as target is webworker
// stackoverflow.com/a/73351738 and github.com/vercel/next.js/issues/28774
// github.com/Avansai/next-multilingual/blob/aaad6a7204/src/config/index.ts#L750
new
webpack
.
NormalModuleReplacementPlugin
(
/
n
o
d
e
:
/
,
(
resource
)
=>
{
resource
.
request
=
resource
.
request
.
replace
(
/
^
n
o
d
e
:
/
,
""
)
;
}
)
,
new
webpack
.
ProvidePlugin
(
{
Buffer
:
[
"buffer"
,
"Buffer"
]
,
}
)
,
new
webpack
.
IgnorePlugin
(
{
resourceRegExp
:
// eslint-disable-next-line max-len
/
(
^
d
g
r
a
m
$
)
|
(
^
h
t
t
p
2
$
)
|
(
\/
d
e
n
o
\/
.
*
\.
t
s
$
)
|
(
.
*
-
d
e
n
o
\.
t
s
$
)
|
(
.
*
\.
d
e
n
o
\.
t
s
$
)
|
(
\/
n
o
d
e
\/
.
*
\.
j
s
$
)
|
(
.
*
-
n
o
d
e
\.
j
s
$
)
|
(
.
*
\.
n
o
d
e
\.
j
s
$
)
/
,
}
)
,
// stackoverflow.com/a/65556946
new
NodePolyfillPlugin
(
)
,
]
,
optimization
:
{
usedExports
:
true
,
minimize
:
false
,
}
,
experiments
:
{
outputModule
:
true
,
}
,
// stackoverflow.com/a/68916455
output
:
{
library
:
{
type
:
"module"
,
}
,
filename
:
"worker.js"
,
module
:
true
,
}
,
}
;
Back
|
FazBrowse Home
|
New Git URL