diff --git a/biome.jsonc b/biome.jsonc index b2908ab3e6f..310416ee5b8 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -48,9 +48,6 @@ "performance": { "noDelete": "off" }, - "security": { - "noGlobalEval": "off" - }, "suspicious": { "noFallthroughSwitchClause": "off", "noConfusingVoidType": "off", diff --git a/packages/rspack/src/loader-runner/loadLoader.ts b/packages/rspack/src/loader-runner/loadLoader.ts index 788ff25816b..d734e67bcc1 100644 --- a/packages/rspack/src/loader-runner/loadLoader.ts +++ b/packages/rspack/src/loader-runner/loadLoader.ts @@ -31,9 +31,7 @@ export default function loadLoader( try { if (url === undefined) url = require("node:url"); const loaderUrl = url!.pathToFileURL(loader.path); - const modulePromise = eval( - `import(${JSON.stringify(loaderUrl.toString())})` - ); + const modulePromise = import(JSON.stringify(loaderUrl.toString())); modulePromise.then((module: LoaderModule) => { handleResult(loader, module, callback); }, callback);