-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
build time went from 40s to 10min #1790
Comments
One of my colleagues has pointed out that the issue is likely connected to our update of material-ui/icons from v1 to v2. After downgrading icons to 1.1.0 build time went back to 40s. Not sure who to blame :-) |
Does it still happen on latest version, as the watcher has been slightly improved? |
Yes, the error I posted is for 1.9.7 |
This also happens for me using @material-ui/icons if I import named exports, as this causes all of the icons to be included in the bundle and there is a lot of them. Until tree shaking support in parcel is stable and supported for the development server, the workaround is to import all material-ui icons with full paths in your application such as:
This is also detailed in the @material-ui/icons readme as the recommended way to import icons if your environment does not support tree shaking. |
Parcel supports treeshaking, it's just not advised to use it in production. Tree shaking is something that mostly happens after parsing though, so this would probably not have the expected/wanted effect on build time and it's also a very bad practise to rely on treeshaking this heavily as it's no magic. (def not if you can include the icons one at a time) |
Closing this as it appears to be a project issue, not a parcel issue |
🐛 bug report
The original report was for 1.9.7, but downgrading to 1.9.2 didn't solve the issue. We added a bunch of new code and now any version gets stuck for 10 minutes before build succeeds. Builds on heroku take 15 minutes.
rebuilds with .cache apparently don't work at all (at least on 1.9.7)
Not sure if this is somehow connected to inotfy, but just in case my limit is
fs.inotify.max_user_watches = 128000
that didn't resolve the issue
🌍 Your Environment
the version before update was 1.9.2
The text was updated successfully, but these errors were encountered: