google / google/closure-compiler
Compiling Autolinker.js with simple optimizations gives broken output
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
When I use closure compiler to minify `Autolinker.js`, the output is broken JavaScript that throws an error when loaded.
For the input file, go here: https://github.com/gregjacobs/Autolinker.js/releases/tag/0.27.0
and grab `Autolinker.js-0.27.0/dist/Autolinker.js` (the unminified version)
When loaded on an HTML page, the minified file gives this error and the library is unusable:
`Uncaught TypeError: Cannot read property 'prototype' of undefined` on line 9
This is a somewhat new problem. Here are a few versions of `closure-compiler-unshaded` that I tested with:
- OK in v20160517
- broken in v20160619
- broken in v20160713
I see the same problem using the online webapp version of closure compiler at the time of this writing. https://closure-compiler.appspot.com/home
Contributor guide
Assessment
This issue has not been assessed yet.