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

importing anything from @remirror/react adds 1917 modules for next dev server #2218

Open
hjoelh opened this issue Dec 1, 2023 · 1 comment
Labels
type: bug 🪲 Something isn't working

Comments

@hjoelh
Copy link

hjoelh commented Dec 1, 2023

Summary

importing anything from @remirror/react adds 1917 modules for next dev server
@remirror/react exports all of it sub-packages in a single barrel file, next dev server is requiring all these exports

CleanShot 2023-12-01 at 10  27 08@2x

CleanShot 2023-12-01 at 10  29 48@2x

Steps to reproduce

Codesandbox, you can go to app/page.tsx and remove the import and restart the dev server to see the different in module imports

Expected results

Too not add soo many modules for dev server to load 😢

Actual results

Possible Solution

How we optimized package imports in Next.js - probably relevant

Needs some rearchitecting around how it imports/exports

As a temp fix in a project at work, I managed to reduce this issue by just installing a sub-package, but those sub packages also export a lot of unnecessary things, although not as bad as this main package

Screenshot(s)

@hjoelh hjoelh added the type: bug 🪲 Something isn't working label Dec 1, 2023
@dgtllion
Copy link

Is there any update about that? Compiling pages where remirror is added is too slow, even with simple editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants