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(cache): use top level function to avoid rollup chunk ordering issues #2741

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Sep 20, 2024

(reported by @danielroe reproduced on nuxt ecosystem CI for storybook docs but issue is generic and hard to reproduce)

Rollup can make .output/server/chunks/nitro.mjs with wrong ordering of top-level const definitions based on different ways of importing utils/aliases.

Only way to avoid this with bug, is using function declarations since runtime will hoist them up regardless of order.

@pi0 pi0 self-assigned this Sep 20, 2024
@pi0 pi0 merged commit 1322f6e into v2 Sep 20, 2024
5 checks passed
@pi0 pi0 deleted the fix/cache-order branch September 20, 2024 10:30
@pi0 pi0 mentioned this pull request Oct 31, 2024
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.

1 participant