Skip to content

Commit

Permalink
fix: should not stringify loader loading requests (#7643)
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a authored Aug 21, 2024
1 parent c6accb4 commit ba230a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rspack/src/loader-runner/loadLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function loadLoader(
try {
if (url === undefined) url = require("node:url");
const loaderUrl = url!.pathToFileURL(loader.path);
const modulePromise = import(JSON.stringify(loaderUrl.toString()));
const modulePromise = import(loaderUrl.toString());
modulePromise.then((module: LoaderModule) => {
handleResult(loader, module, callback);
}, callback);
Expand Down

2 comments on commit ba230a4

@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 ✅ success
_selftest ✅ success
nx ❌ failure
rspress ✅ success
rslib ✅ success
rsbuild ❌ failure
examples ✅ success

@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-08-21 dd6e27a) Current Change
10000_development-mode + exec 2.36 s ± 30 ms 2.34 s ± 22 ms -0.63 %
10000_development-mode_hmr + exec 712 ms ± 10 ms 713 ms ± 6.7 ms +0.08 %
10000_production-mode + exec 3.02 s ± 24 ms 3.04 s ± 14 ms +0.76 %
arco-pro_development-mode + exec 1.91 s ± 60 ms 1.91 s ± 41 ms -0.08 %
arco-pro_development-mode_hmr + exec 438 ms ± 3.3 ms 438 ms ± 3 ms -0.15 %
arco-pro_production-mode + exec 3.47 s ± 86 ms 3.5 s ± 90 ms +0.78 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.52 s ± 83 ms 3.51 s ± 61 ms -0.20 %
threejs_development-mode_10x + exec 1.69 s ± 19 ms 1.71 s ± 19 ms +1.05 %
threejs_development-mode_10x_hmr + exec 797 ms ± 6 ms 819 ms ± 6.2 ms +2.73 %
threejs_production-mode_10x + exec 5.48 s ± 33 ms 5.57 s ± 21 ms +1.78 %

Please sign in to comment.