Preact: Latest release is completely broken

Created on 27 Apr 2018  路  9Comments  路  Source: preactjs/preact

It looks like there was an update to the minification script which caused all variables to be renamed, which probably was to save some extra bytes in the package. However, it renamed all the exports, and it also renamed "exports" as well, so now the package exports an empty object, which causes anything using preact to fail completely. Here's how the main export looks, built from the latest release directly:

For now, we are pinning to 8.2.7, which fixes the problem. Probably something should be done about this quickly, as it's a fairly critical issue.

All 9 comments

Ack! We will fix this right away.

Alright, we have rolled it back for now. Thanks for reporting @jescalan!

FYI: Filed an issue at the uglify repo https://github.com/mishoo/UglifyJS2/issues/3107

@marvinhagemeister is this the same issue with uglifyjs v3 handle inline function? #1065

might also want to consider switching to https://github.com/google/closure-compiler-js, it's much slower (several seconds vs dozens of ms) but the bundles end up smaller and with fewer regressions, in my experience.

@leeoniya I'd certainly be open to it - Sam did a bunch of experimentation and got things set up with GCC a while back in #564.

@yaodingyd yup, the VNode constructor issue is that one. Thing is, I believe we are benefitting from function inlining elsewhere, so we can't turn it off wholesale.

Re-open, because we haven't made a new release yet.

Very exciting, thanks for your great work! 馃檱馃檱馃檱

Was this page helpful?
0 / 5 - 0 ratings

Related issues

k15a picture k15a  路  3Comments

matthewmueller picture matthewmueller  路  3Comments

simonjoom picture simonjoom  路  3Comments

jescalan picture jescalan  路  3Comments

Zashy picture Zashy  路  3Comments