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 #77

Merged

Conversation

drakosvlad
Copy link
Contributor

After migrating to the Focal version 0.8.1, I have got the same error as in issue #66. It turned out that the reason was that the effectful module lens/json.js did not make it to the production bundle because sideEffects were set to false in package.json. However, the sideEffects update in the MR #65 did not fix the problem, and the module was still not included in the bundle. I have found that we also need to add the lens/index.js module to the sideEffects for lens/json.js module to appear in the production build.

After adding this module to the sideEffects field, the lens/json module is added to the bundle and the .key is not a function error does not happen anymore.

@oleksiilevzhynskyi oleksiilevzhynskyi linked an issue Jan 19, 2021 that may be closed by this pull request
@oleksiilevzhynskyi oleksiilevzhynskyi merged commit 5739a2b into grammarly:master Jan 19, 2021
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.

Uncaught TypeError: f.a.key is not a function
2 participants