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

Production build still contains un-used bundle #54

Open
thanhlmm opened this issue Jun 14, 2022 · 1 comment
Open

Production build still contains un-used bundle #54

thanhlmm opened this issue Jun 14, 2022 · 1 comment

Comments

@thanhlmm
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Add analyze package
  2. Build for Analyze

Expected behavior
There shouldn't be @floating-ui here.

I would suggest turn on sideEffect=false to support tree sharking

Screenshots
Screen Shot 2022-06-14 at 5 22 21 PM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@iamyoki
Copy link
Contributor

iamyoki commented Aug 28, 2022

I met this problem as well, my temp solution is this

const DevClickToComponent =
  process.env.NODE_ENV === 'development'
    ? require('click-to-react-component').ClickToComponent
    : () => null;
<DevClickToComponent />

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

2 participants