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

Break React.Context in production build #122

Open
lianghx-319 opened this issue Nov 4, 2022 · 1 comment
Open

Break React.Context in production build #122

lianghx-319 opened this issue Nov 4, 2022 · 1 comment

Comments

@lianghx-319
Copy link

Describe the bug
In some case, this plugin break the source code, which is written by react.

Specific, when the code about React.Context included in plugin process, the behavior will change in production build. But dev mode is all find.

To Reproduce Provided later
Steps to reproduce the behavior:

  1. Clone repository '...'
  2. Run '....'
  3. See error

Expected behavior
I can include all source code to windicss process, don't worry about suffering crash on production deploy.

Screenshots
image

Additional context

  • When I disabled windicss plugin, all find. I have no idea the reason why.
@lianghx-319
Copy link
Author

When I compare the output between using windicss plugin and not using windicss plugin. I found that the duplicate react hook, wrapped the react context. And Provider and Consumer reference the different react context.

I built my project on debian os. node version is v14.20.0

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

No branches or pull requests

1 participant