Skip to content

Commit dd22413

Browse files
committed
fix path issues on test
1 parent 24ec0ce commit dd22413

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/container.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,13 @@ async function requireHelperFromModule(helperName, config, HelperClass) {
443443
try {
444444
// For built-in helpers, use direct relative import with .js extension
445445
const helperPath = `${moduleName}.js`
446-
const mod = isWindows() ? await import(pathToFileURL(helperPath).href) : await import(helperPath)
446+
447+
const resolvedImportPath =
448+
isWindows() && typeof helperPath === 'string' && path.isAbsolute(helperPath)
449+
? pathToFileURL(helperPath).href
450+
: helperPath
451+
452+
const mod = await import(resolvedImportPath)
447453
HelperClass = mod.default || mod
448454
} catch (err) {
449455
throw err

0 commit comments

Comments
 (0)