-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Migrate to PureScript 0.15 #112
Conversation
Zephyr stopped working in my project after I upgraded to 0.15 and I came here to see what you might be doing. Can you explain why Zephyr is no longer needed, or are you just satisfied the the bundle is small enough to remove it? Thanks! |
FWIW, my build started failing with errors like this:
|
According to this, it seems like tools like webpack should now be able to do DCE. I'm also using https://discord.com/channels/864614189094928394/872650895744176188/983717748666413108 |
JS bundlers had a hard time performing dead code elimination on the CommonJS output of the PureScript compiler prior to 0.15. For that reason, I relied on Zephyr to perform DCE on the PureScript code, and then bundled the result. However, the PureScript 0.15 compiler produces ES modules as output, with purity annotations, which greatly helps bundlers like webpack and esbuild along. Bundling the output of the PureScript 0.15 compiler is typically about 30% smaller than bundling the output of PureScript 0.14 compiled to corefn and then run through Zephyr. The end result: Zephyr isn't needed anymore. If you need any extra motivation, I don't believe there's a version of Zephyr that even works with the PureScript 0.15 compiler. |
This pull request migrates Real World Halogen from PureScript 0.14 to 0.15 and from Halogen 6 to 7.
The biggest update to the compiler in PureScript 0.15 is the switch from CommonJS to ES modules. Among other benefits, the new output results in up to 25% smaller bundles (Real World Halogen dropped 100kb, from 600kb to 500kb 🎉). It also means that we no longer need to use
zephyr
, so that has been dropped from this project. Learn more:Halogen 7 is an intentionally tiny release that mostly provides compatibility with PureScript 0.15. It has no changes that affected Real World Halogen. Still, it may have changes that affect you, so it's worth reading that migration guide too:
And that's about it! Upgrading to the latest compiler and Halogen release is pretty painless.