Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

refactor(nuxt): do not add all composable auto-imports to globalThis #9630

Merged
merged 3 commits into from
Dec 13, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

globals is turned off by default, and I think we can keep the same behaviour as without it. Otherwise there's extra work done on initial build/warmup for all composables and I'm not sure of the benefit. (I think it is a hold-over from previous default behaviour.)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working chore 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Dec 9, 2022
@danielroe danielroe requested review from pi0 and antfu December 9, 2022 15:59
@danielroe danielroe self-assigned this Dec 9, 2022
@codesandbox
Copy link

codesandbox bot commented Dec 9, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@danielroe danielroe changed the title perf(nuxt): do not add all composable auto-imports to globalThis perf(nuxt): do not add all composable auto-imports to globalThis Dec 9, 2022
@pi0
Copy link
Member

pi0 commented Dec 12, 2022

global option was actually added to remove the parsing overhead (to detect usage in dev) but i think transform overhead of loading composable files should be more at least in a small sized project (we never benchmarked AFAIK)

Removing this option makes sense πŸ‘πŸΌ Only i think we can consider this PR a refactor since is not changing any behavior?

@vercel vercel bot temporarily deployed to Preview December 12, 2022 12:36 Inactive
@danielroe danielroe changed the title perf(nuxt): do not add all composable auto-imports to globalThis refactor(nuxt): do not add all composable auto-imports to globalThis Dec 13, 2022
@danielroe danielroe merged commit 0cb9a4c into main Dec 13, 2022
@danielroe danielroe deleted the perf/inject-globals branch December 13, 2022 10:30
@pi0 pi0 mentioned this pull request Dec 15, 2022
6 tasks
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe mentioned this pull request Jan 20, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
3.x bug Something isn't working chore 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants