- let fScope = path.basename(filename, '.js');
- if (fScope === 'index') {
- fScope = path.basename(path.dirname(filename));
- }
- return (scope) => `${fScope}:${scope}`;
+ const shortFilename = path.basename(filename, '.js');
+ const fScope = (shortFilename === 'index') ? path.basename(path.dirname(filename)) : shortFilename;
+ return (scope) => [libraryIdentifier, fScope, scope].join(':');