Skip to content

Commit a2bea83

Browse files
authored
fix(build-resources): allow scoped modules
1 parent b5b9fae commit a2bea83

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/build-resources.js

+7
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ function getRealModulePath(fromPath) {
146146
let fromPathSplit = fromPath.split('/');
147147
let moduleName = fromPathSplit.shift();
148148
let modulePathIndex = moduleNames.indexOf(moduleName);
149+
150+
if (modulePathIndex === -1 && fromPathSplit.length > 0) {
151+
// the module might be scoped, let's see:
152+
moduleName += `/${fromPathSplit.shift()}`;
153+
modulePathIndex = moduleNames.indexOf(moduleName);
154+
}
155+
149156
let modulePath;
150157
if (modulePathIndex !== -1) {
151158
modulePath = modulePaths[modulePathIndex];

0 commit comments

Comments
 (0)