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

feat: implement monorepo compatibility layer with library #273

Merged
merged 4 commits into from
Dec 13, 2020

Conversation

pmmmwh
Copy link
Owner

@pmmmwh pmmmwh commented Dec 13, 2020

This PR implements a compatibility layer to allow multiple instances of React/React-Refresh to run simultaneously. Another layer of compatibility is added to the overlay to make sure only the first injection would happen (since it is global).

TODO: Documentation

Fixes #139
Fixes #239
Fixes #250

@pmmmwh pmmmwh added the enhancement New feature or request label Dec 13, 2020
@pmmmwh pmmmwh self-assigned this Dec 13, 2020
@pmmmwh pmmmwh merged commit e8e32af into main Dec 13, 2020
@pmmmwh pmmmwh deleted the feat/monorepo-compat branch December 13, 2020 23:36
@frehner
Copy link
Contributor

frehner commented Dec 14, 2020

@pmmmwh in webpack5, webpack looks at either output.library, or package.json's name field, or output.uniqueName

Here's the docs on that https://webpack.js.org/configuration/output/#outputuniquename

Should we update this to accept those different fields?

@pmmmwh
Copy link
Owner Author

pmmmwh commented Dec 14, 2020

@pmmmwh in webpack5, webpack looks at either output.library, or package.json's name field, or output.uniqueName

Here's the docs on that https://webpack.js.org/configuration/output/#outputuniquename

Should we update this to accept those different fields?

I guess the simplest way out is to let Webpack do its thing, look at output.uniqueNameand if not found default to output.library?

@frehner
Copy link
Contributor

frehner commented Dec 14, 2020

@pmmmwh in webpack5, webpack looks at either output.library, or package.json's name field, or output.uniqueName
Here's the docs on that https://webpack.js.org/configuration/output/#outputuniquename
Should we update this to accept those different fields?

I guess the simplest way out is to let Webpack do its thing, look at output.uniqueNameand if not found default to output.library?

I haven't looked too closely at it to know for sure, but that may work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants