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

Webpack issue with DLL #15601

Closed
2 tasks done
o-alexandrov opened this issue May 6, 2019 · 4 comments
Closed
2 tasks done

Webpack issue with DLL #15601

o-alexandrov opened this issue May 6, 2019 · 4 comments
Labels
external dependency Blocked by external dependency, we can’t do anything about it

Comments

@o-alexandrov
Copy link
Contributor

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

Using a tool like webpack and its plugin webpack dll plugin,
The MaterialUI library should work if prebundled to use as a DLL for better (faster) use in development.

Current Behavior 😯

Hooks become broken if used as part of the prebundled DLL.
See facebook/react#15447

Context 🔦

It negatively affects performance, as the library could have been prebundled optimizing the work of webpack for the use in development.

@oliviertassinari
Copy link
Member

Is this issue specific to Material-UI? Do you have a reproduction example?

@oliviertassinari oliviertassinari added the status: waiting for author Issue with insufficient information label May 6, 2019
@o-alexandrov
Copy link
Contributor Author

It is not specific to Material-UI. However, the users of Material-UI are affected by the decision to use React Hooks, and this specific downside is not documented.

The problem is due to the transformation that happens when prebundling React Hooks. The transformation makes the React Hooks non-functional.

No, sorry, I don't have a full reproduction example.
I do, however, express in detail how I tested it here, and in the issue's description above

@oliviertassinari oliviertassinari added external dependency Blocked by external dependency, we can’t do anything about it and removed status: waiting for author Issue with insufficient information labels May 6, 2019
@oliviertassinari
Copy link
Member

@o-alexandrov Thanks. I have experienced a similar same problem trying to upgrade to a more recent version of Next.js.

@oliviertassinari oliviertassinari self-assigned this May 6, 2019
@oliviertassinari oliviertassinari changed the title [BUG|FEATURE REQUEST] @next library is broken if prebundled (used as DLL) Webpack issue with DLL May 11, 2019
@oliviertassinari oliviertassinari removed their assignment May 27, 2019
@singharpit94
Copy link

Did anyone find any solution to make this work with dll builds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependency Blocked by external dependency, we can’t do anything about it
Projects
None yet
Development

No branches or pull requests

3 participants