Slow when importing from a big ESM bundle
See original GitHub issue🐛 Bug Report
Currently an ejected CRA is slow when we use @material-ui/icons
, especially when importing from @material-ui/icons/esm
instead of importing the icons separately.
It takes about 120 seconds with a cold / empty cache and 5-6 seconds with a hot / filled cache.
To Reproduce
git clone git@github.com:DanielRuf/test-app.git
cd test-app
yarn
yarn test
Steps to reproduce the behavior:
- run the tests
Expected behavior
The tests should run very quickly.
Link to repl or repo (highly encouraged)
envinfo
System:
OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
Binaries:
Node: 10.16.0 - ~/.nodenv/versions/10.16.0/bin/node
Yarn: 1.17.3 - /usr/bin/yarn
npm: 6.9.0 - ~/.nodenv/versions/10.16.0/bin/npm
npmPackages:
jest: 24.9.0 => 25.0.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Is Webpack Packaging Too Slow? Try the Bundleless Mode
Webpack can package various resources into bundles. As increasing resources need to be packaged, the efficiency of the packaging process ...
Read more >How CommonJS is making your bundles larger - web.dev
In this post, we'll look into what CommonJS is and why it's making your JavaScript bundles larger than necessary.
Read more >Minimizing bundle size - Material UI - MUI
Development bundles can contain the full library which can lead to slower startup times. This is especially noticeable if you use named imports...
Read more >Slow Running Import Fixes And Workarounds - WP All Import
Are your imports running slower than you expected? This guide will walk you through common causes and how to resolve them.
Read more >Gotchas - Remix
Gotchas · Server Code in Client Bundles · Importing ESM Packages · typeof window checks · Browser extensions injecting code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @thymikee,
You should be able to see https://github.com/DanielRuf/test-app
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.