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

feat(next): generate import map before build #11502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Mar 3, 2025

When a component is loaded conditionally from environment variables (for example by whether some plugin is enabled/disabled), the resulted import map can be different which can cause runtime errors.

This PR adds execution of generate:importmap before next build happens which ensures that the current import map is generated from the current environment.

Can be disabled with PAYLOAD_GENERATE_IMPORTMAP_ON_BUILD='false' environment variable

Copy link
Contributor

@GermanJablo GermanJablo left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants