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

[Fresh] Add options to configure RefreshReg and RefreshSig identifiers #17340

Merged
merged 1 commit into from Nov 12, 2019
Merged

[Fresh] Add options to configure RefreshReg and RefreshSig identifiers #17340

merged 1 commit into from Nov 12, 2019

Conversation

vasiliicuhar
Copy link
Contributor

Allow to override $RefreshReg$ and $RefreshSig$ identifiers.
Main reason is to use import.meta in async environments (i.e. rollup + SystemJS) builds instead of relying on globals.

Usage:

{
  "plugins": [
    ["react-refresh/babel", {
      "refreshReg": "import.meta.refreshReg",
      "refreshSig": "import.meta.refreshSig"
    }]
  ]
}

Closes: #17237

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit fb0cc02:

Sandbox Source
interesting-williamson-ylmm8 Configuration

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 11, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c46dc01:

Sandbox Source
hungry-water-de6vx Configuration

@sizebot
Copy link

sizebot commented Nov 11, 2019

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against c46dc01

@sizebot
Copy link

sizebot commented Nov 11, 2019

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against c46dc01

@vasiliicuhar vasiliicuhar changed the title [Fresh] Add options to confugure RefreshReg and RefreshSig identifiers [Fresh] Add options to configure RefreshReg and RefreshSig identifiers Nov 11, 2019
@vasiliicuhar

This comment has been minimized.

@gaearon gaearon merged commit f4cc45c into facebook:master Nov 12, 2019
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.

react-refresh: add options to override $RefreshReg$ and $RefreshSig$ for better System.js integration
4 participants