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

plugin-react-refresh: fix global variable 'exports' leak #1560

Conversation

u-b-i-p-i-x-e-l-s
Copy link
Contributor

@u-b-i-p-i-x-e-l-s u-b-i-p-i-x-e-l-s commented Nov 9, 2020

Changes

Place the exports variable global variable into a scope to prevent it from being leaked globally.

Before tests:
Screen Shot 2020-11-09 at 12 24 39 PM
After tests:
Screen Shot 2020-11-09 at 12 18 16 PM

Testing

Updated the snapshot to reflect added scope.

Docs

No documentation update.

@vercel
Copy link

vercel bot commented Nov 9, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/qr9bixt4d
✅ Preview: https://snowpack-git-fix-react-refresh-plugin-global.pikapkg.vercel.app

@u-b-i-p-i-x-e-l-s u-b-i-p-i-x-e-l-s changed the title fix: global variable 'exports' leak plugin react-refresh: fix global variable 'exports' leak Nov 9, 2020
@u-b-i-p-i-x-e-l-s u-b-i-p-i-x-e-l-s changed the title plugin react-refresh: fix global variable 'exports' leak plugin-react-refresh: fix global variable 'exports' leak Nov 9, 2020
@FredKSchott
Copy link
Owner

oh wow, great catch! Tested myself and lgtm

@FredKSchott FredKSchott merged commit 0a47669 into FredKSchott:master Nov 10, 2020
@u-b-i-p-i-x-e-l-s u-b-i-p-i-x-e-l-s deleted the fix-react-refresh-plugin-global branch November 10, 2020 19:00
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