Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Avoid redundant bundle creation #741

Merged
merged 6 commits into from
May 16, 2022

Conversation

matz3
Copy link
Member

@matz3 matz3 commented May 2, 2022

When a custom bundle has the same name as a built-in bundle (e.g.
foo/bar/library-preload.js), then the creation of the built-in bundle
can be skipped.

When a custom bundle has the same name as a built-in bundle (e.g.
foo/bar/library-preload.js), then the creation of the built-in bundle
can be skipped.
@coveralls
Copy link

coveralls commented May 2, 2022

Coverage Status

Coverage decreased (-0.1%) to 94.804% when pulling 6a80af8 on next-avoid-redundant-bundle-creation into 97cfa6c on next.

@matz3 matz3 marked this pull request as ready for review May 13, 2022 11:46
@matz3 matz3 requested a review from RandomByte May 13, 2022 12:18
lib/tasks/bundlers/generateComponentPreload.js Outdated Show resolved Hide resolved
@@ -65,6 +66,12 @@ module.exports = function({
const unusedFilterExcludes = new Set(allFilterExcludes);

const bundleDefinitions = allNamespaces.map((namespace) => {
const bundleName = `${namespace}/Component-preload.js`;
if (skipBundles.includes(bundleName)) {
log.verbose(`skipping overridden built-in bundle ${bundleName}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.verbose(`skipping overridden built-in bundle ${bundleName}`);
log.verbose(`Skipping generation of bundle ${bundleName} as requested`);

@@ -285,6 +244,14 @@ module.exports = function({workspace, taskUtil, options: {projectName, excludes
});
}

const execModuleBundlerIfNeeded = ({options, resources}) => {
if (skipBundles.includes(options.bundleDefinition.name)) {
log.verbose(`skipping overridden built-in bundle ${options.bundleDefinition.name}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.verbose(`skipping overridden built-in bundle ${options.bundleDefinition.name}`);
log.verbose(`Skipping generation of bundle ${bundleName} as requested`);

lib/tasks/bundlers/generateLibraryPreload.js Outdated Show resolved Hide resolved
@matz3 matz3 merged commit 13c8405 into next May 16, 2022
@matz3 matz3 deleted the next-avoid-redundant-bundle-creation branch May 16, 2022 09:48
RandomByte added a commit to SAP/ui5-project that referenced this pull request May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants