Skip to content

Commit

Permalink
fix: change the data URI type in ModuleFederationPlugin (#6567)
Browse files Browse the repository at this point in the history
fix(mf): change the data URI type
  • Loading branch information
chenjiahan authored May 17, 2024
1 parent be7b382 commit 3b67e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rspack/src/container/ModuleFederationPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ function getDefaultEntryRuntime(
)}`,
compiler.webpack.Template.getFunctionContent(require("./default.runtime"))
].join("\n");
// use "application/node" to use moduleType "javascript/auto"
return `data:application/node,${content}`;
// use "data:text/javascript" to use moduleType "javascript/auto"
return `data:text/javascript,${content}`;
}

2 comments on commit 3b67e0d

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-05-17 96d98de) Current Change
10000_development-mode + exec 2.59 s ± 24 ms 2.56 s ± 27 ms -0.99 %
10000_development-mode_hmr + exec 699 ms ± 14 ms 686 ms ± 9.1 ms -1.86 %
10000_production-mode + exec 2.46 s ± 48 ms 2.41 s ± 32 ms -2.20 %
arco-pro_development-mode + exec 2.43 s ± 65 ms 2.45 s ± 78 ms +0.80 %
arco-pro_development-mode_hmr + exec 432 ms ± 1.5 ms 431 ms ± 2.5 ms -0.07 %
arco-pro_development-mode_hmr_intercept-plugin + exec 440 ms ± 3.3 ms 440 ms ± 2.9 ms +0.03 %
arco-pro_development-mode_intercept-plugin + exec 3.28 s ± 58 ms 3.29 s ± 88 ms +0.22 %
arco-pro_production-mode + exec 4.04 s ± 64 ms 4 s ± 98 ms -1.00 %
arco-pro_production-mode_intercept-plugin + exec 4.88 s ± 89 ms 4.79 s ± 111 ms -1.78 %
threejs_development-mode_10x + exec 1.97 s ± 28 ms 1.95 s ± 15 ms -0.82 %
threejs_development-mode_10x_hmr + exec 761 ms ± 21 ms 747 ms ± 7 ms -1.81 %
threejs_production-mode_10x + exec 5.21 s ± 29 ms 5.08 s ± 55 ms -2.40 %

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs, self-hosted, Linux, ci ❌ failure
_selftest, ubuntu-latest ✅ success
nx, ubuntu-latest ✅ success
rspress, ubuntu-latest ✅ success
rsbuild, ubuntu-latest ✅ success
compat, ubuntu-latest ✅ success
examples, ubuntu-latest ✅ success

Please sign in to comment.