Skip to content

Commit

Permalink
fix: wp5 nodebuildin modules
Browse files Browse the repository at this point in the history
  • Loading branch information
fupengl committed May 31, 2022
1 parent ccee830 commit a5a6345
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,36 @@ function rewiredSingleSpa({
);
config.resolve.fallback = Object.assign(
config.resolve.fallback || {},
// @see https://github.com/webpack/webpack/blob/c181294865dca01b28e6e316636fef5f2aad4eb6/lib/ModuleNotFoundError.js
getFallbackObj({
url: "url",
fs: "fs",
assert: "assert",
crypto: "crypto-browserify",
http: "stream-http",
https: "https-browserify",
os: "os-browserify/browser",
buffer: "buffer",
stream: "stream-browserify",
assert: 'assert/',
buffer: 'buffer/',
console: 'console-browserify',
constants: 'constants-browserify',
crypto: 'crypto-browserify',
domain: 'domain-browser',
events: 'events/',
http: 'stream-http',
https: 'https-browserify',
os: 'os-browserify/browser',
path: 'path-browserify',
punycode: 'punycode/',
process: 'process/browser',
querystring: 'querystring-es3',
stream: 'stream-browserify',
_stream_duplex: 'readable-stream/duplex',
_stream_passthrough: 'readable-stream/passthrough',
_stream_readable: 'readable-stream/readable',
_stream_transform: 'readable-stream/transform',
_stream_writable: 'readable-stream/writable',
string_decoder: 'string_decoder/',
sys: 'util/',
timers: 'timers-browserify',
tty: 'tty-browserify',
url: 'url/',
util: 'util/',
vm: 'vm-browserify',
zlib: 'browserify-zlib',
})
);
}
Expand Down

0 comments on commit a5a6345

Please sign in to comment.