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: avoid importing all of lodash #1853

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leventdeniz
Copy link

This PR reduces bundle size and makes it more resilient to use in monorepo setups using nx or yarn workspaces.

This specific error is fixed:

TypeError: _.uniq is not a function
    at HtmlWebpackPlugin.getAssetFiles (/app/node_modules/html-webpack-plugin/index.js:738:21)
    at HtmlWebpackPlugin.generateHTML (/app/node_modules/html-webpack-plugin/index.js:1025:46)
    at /app/node_modules/html-webpack-plugin/index.js:174:22
    at fn (/app/node_modules/webpack/lib/Compilation.js:510:9)
    at _next2 (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at eval (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:39:1)
    at eval (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
Bildschirmfoto 2024-07-11 um 10 48 16

@alexander-akait
Copy link
Collaborator

Can you fix tests?

@leventdeniz
Copy link
Author

I'm not sure why the tests fail to be honest, it works on my machine (mac latest)

image

@alexander-akait
Copy link
Collaborator

I think there are different versions of packages for tests, i.e. just bump lock file here

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.

2 participants