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

PRO-6835: Determine Best AssetUrl is in easy mode with the new build system #4814

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

myovchev
Copy link
Contributor

Summary

The new build system (when external build module is self-registered) doesn't need any computations about "what is the override of a given module". The asset override is done on fs level and the path doesn't need "my-*" prefix in the URL. However, the legacy Webpack system still needs the computations. This patch fixes it all in a BC way.

What are the specific steps to test this change?

Override a preview image for @apostrophecms/image-widget in modules/@apostrophecms/image-widget/public/preview.jpg (project level).

When no external build module (Vite) is registered the preview will be resolved (and properly shown) to:

/apos-frontend/default/modules/@apostrophecms/my-image-widget/preview.jpg

When external build module (Vite) IS registered the preview will be resolved (and properly shown) to:

/apos-frontend/default/modules/@apostrophecms/image-widget/preview.jpg

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Copy link

linear bot commented Nov 23, 2024

@myovchev myovchev requested a review from boutell November 23, 2024 10:52
@myovchev myovchev merged commit e05027b into main Nov 23, 2024
9 checks passed
@myovchev myovchev deleted the PRO-6835-fix-best-url branch November 23, 2024 16:10
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.

2 participants