Skip to content

Commit d7dec55

Browse files
committed
fix(build-resources): fix a regression caused by scoping support
1 parent 40ddc1e commit d7dec55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/build-resources.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ async function autoresolveTemplates(resources, packagePath, srcPath) {
370370

371371
function fixRelativeFromPath(fromPath, realSrcPath, realParentPath, externalModule) {
372372
let fromPathSplit = fromPath.split('/');
373-
if (moduleNames.indexOf(fromPathSplit[0]) !== -1 || moduleNames.indexOf(path.join(fromPathSplit[0], fromPathSplit[1])) !== -1) {
373+
if (moduleNames.indexOf(fromPathSplit[0]) !== -1 || (fromPathSplit.length > 1 && moduleNames.indexOf(path.join(fromPathSplit[0], fromPathSplit[1])) !== -1)) {
374374
// already a module reference, non-relative, leave as-is:
375375
return fromPath;
376376
} else {

0 commit comments

Comments
 (0)