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

Fix tree shaking #1474

Closed
wants to merge 2 commits into from
Closed

Fix tree shaking #1474

wants to merge 2 commits into from

Conversation

benoitgrelard
Copy link
Collaborator

Fixes #1428

@benoitgrelard
Copy link
Collaborator Author

Ok, this isn't as simple to change as I thought…

Mostly because of all the tsconfig mapping, but now also turns out the jest mapping too for tests.
They're all really geared better towards solutions with index files.

So we have a few options:

  • try and update the jest mapping (moduleNameMapper) to make it work, so explicitly listing each package one by one like we have to do in the tsconfig (I've tried that quickly and still had issues)
  • name all of the source files index.ts(x) so that the index is the source file directly. The thing I don't love about this is the experience in the editor when everything is called index. That said, I tried that quickly too and it looks like vscode now shows the "folder" that isn't in common next to the name, so combined with the fuzzy search, maybe this isn't as much as a big deal as I think?

Any other ideas? Obviously, the best thing would be that the issue gets fixed quickly 😀

@benoitgrelard benoitgrelard deleted the fix-tree-shaking branch June 20, 2022 11:56
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

Successfully merging this pull request may close these issues.

Tree-shaking is broken in "next" release
1 participant