Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don’t unnecessarily invalidate the module map #124

Merged
merged 2 commits into from
May 24, 2019

Conversation

cyrilfretlink
Copy link
Contributor

Additional imports in PureScript sources (compared to their JavaScript output) shouldn’t always invalidate the module map because imports of types are erased and re-exports are followed.

Also Prim.* modules are internal to the compiler and won’t ever be present in the module map.

Fix #123.

Additional imports in PureScript sources (compared to their JavaScript output) shouldn’t always invalidate the module map because imports of types are erased and re-exports are followed.

Also `Prim.*` modules are internal to the compiler and won’t ever be present in the module map.
@ethul
Copy link
Owner

ethul commented May 16, 2019

Thanks for this PR. I will take a look soon.

Otherwise the following expression

```purs
hello :: Effect Unit
hello = log "Hello"
```

includes the whole `Prelude` into its chunk whereas only `log` is actually needed at runtime.
@cyrilfretlink
Copy link
Contributor Author

The last commit makes bundles made by webpack without purs bundle noticeably smaller 🎉

@ethul
Copy link
Owner

ethul commented May 23, 2019

Great! Thanks for working on this. Is this good to go?

@cyrilfretlink
Copy link
Contributor Author

Yes it is!

@ethul
Copy link
Owner

ethul commented May 24, 2019

Thanks!

@ethul ethul merged commit 1cdd37e into ethul:master May 24, 2019
@cyrilfretlink cyrilfretlink deleted the smarter-module-map-invalidation branch January 16, 2020 08:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: EMFILE: too many open files
2 participants