Skip to content

Commit

Permalink
fix: hack replace
Browse files Browse the repository at this point in the history
  • Loading branch information
HomyeeKing committed Jan 15, 2025
1 parent 31da36d commit 3e30dd9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ class ModifyRequirePlugin {
let code = sourceCode
.replace(/exports\.id/, 'window.__quickMode = {} \nwindow.__quickMode.id')
.replace(/exports\.ids/, 'window.__quickMode.ids')
.replace(/exports\.modules/, 'window.__quickMode.modules');
.replace(/exports\.modules/, 'window.__quickMode.modules')
.replace(
'const { Writable } = stream_browserify_namespaceObject;',
'const { Writable } = stream_browserify;',
);
compilation.updateAsset(
pathname,
new compiler.webpack.sources.SourceMapSource(
Expand Down

0 comments on commit 3e30dd9

Please sign in to comment.