Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/ui5-tooling-modules/lib/rollup-plugin-webcomponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,8 @@ module.exports = function ({ log, resolveModule, projectInfo, getPackageJson, op

// we need to ignore the CLDR locale data json imports as they are
// provided by the UI5 framework and not needed in the bundle
if (removeCLDRData && CLDR_LocaleData_File && importer === CLDR_LocaleData_File && source.endsWith(".json")) {
log.verbose(`Ignoring CLDR locale data import: ${source}`);
return false; // ignore this resource
if (removeCLDRData && importer && posix.resolve(dirname(importer), source) === CLDR_LocaleData_File) {
return `${CLDR_LocaleData_File}#NOOP`; // ignore this resource
}

// entry modules need to be checked for being Web Components as they
Expand Down Expand Up @@ -489,6 +488,12 @@ module.exports = function ({ log, resolveModule, projectInfo, getPackageJson, op
return null;
}

// we need to ignore the CLDR locale data json imports as they are
// provided by the UI5 framework and not needed in the bundle
if (removeCLDRData && id === `${CLDR_LocaleData_File}#NOOP`) {
return ""; // ignore this resource
}

// check if the module should be covered by the plugin
const moduleInfo = this.getModuleInfo(id);
const ui5Meta = moduleInfo?.meta?.ui5;
Expand Down
Loading