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

fix(nitro): replace global. in fewer instances #3107

Merged
merged 1 commit into from
Feb 7, 2022
Merged

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#12777, resolves nuxt/nuxt#13327

❓ 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

We were being a little over-zealous in our replacement. I hope a stray global. won't slip through the net, but by adding a specific list of possible values to replace, we can improve things.

An alternative, which is quite tempting, is to write our own rollup plugin that would add a RegExp that's more precisely targeted to this need (vs @rollup/plugin-replace which only supports non-RE delimiters).

πŸ“ Checklist

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

@danielroe danielroe added bug Something isn't working nitro πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Feb 7, 2022
@danielroe danielroe requested a review from pi0 February 7, 2022 17:08
@danielroe danielroe self-assigned this Feb 7, 2022
@netlify
Copy link

netlify bot commented Feb 7, 2022

βœ”οΈ Deploy Preview for nuxt3-docs canceled.

πŸ”¨ Explore the source changes: 9772517

πŸ” Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/620152202e28bb00072bdf4a

@pi0 pi0 merged commit 22e6c85 into main Feb 7, 2022
@pi0 pi0 deleted the fix/global-replace branch February 7, 2022 20:50
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working nitro πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
2 participants