Skip to content

Commit

Permalink
Merge pull request #221 from crubier/patch-1
Browse files Browse the repository at this point in the history
Add node builtins fallback entries in webpack config
  • Loading branch information
shadowwalker authored Aug 16, 2021
2 parents 98b35cf + 93dac35 commit 54bbba6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
17 changes: 16 additions & 1 deletion build-custom-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,22 @@ const buildCustomWorker = ({ id, basedir, destdir, plugins, success, minify }) =
main: customWorkerEntry
},
resolve: {
extensions: ['.ts', '.js']
extensions: ['.ts', '.js'],
fallback: {
module: false,
dgram: false,
dns: false,
path: false,
fs: false,
os: false,
crypto: false,
stream: false,
http2: false,
net: false,
tls: false,
zlib: false,
child_process: false
}
},
module: {
rules: [
Expand Down
17 changes: 16 additions & 1 deletion build-fallback-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,22 @@ const buildFallbackWorker = ({ id, fallbacks, basedir, destdir, success, minify,
main: fallbackJs
},
resolve: {
extensions: ['.js']
extensions: ['.js'],
fallback: {
module: false,
dgram: false,
dns: false,
path: false,
fs: false,
os: false,
crypto: false,
stream: false,
http2: false,
net: false,
tls: false,
zlib: false,
child_process: false
}
},
module: {
rules: [
Expand Down

0 comments on commit 54bbba6

Please sign in to comment.