mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-01-15 08:23:36 -03:00
Fix bundle names for packages under namespaces
This commit is contained in:
@@ -105,6 +105,14 @@ const config = {
|
||||
// get the name. E.g. node_modules/packageName/not/this/part.js
|
||||
// or node_modules/packageName
|
||||
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
|
||||
// if "packageName" is a namespace (i.e. @jellyfin) get the namespace + packageName
|
||||
if (packageName.startsWith('@')) {
|
||||
const parts = module.context
|
||||
.substring(module.context.lastIndexOf(packageName))
|
||||
.split('/');
|
||||
return `node_modules.${parts[0]}.${parts[1]}`;
|
||||
}
|
||||
|
||||
return `node_modules.${packageName}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user