[Pkg-javascript-devel] Bug#926871: Bug#926871: Uncaught SyntaxError: Unexpected token export
Jérémy Lal
kapouer at melix.org
Thu Apr 11 22:30:52 BST 2019
Le jeu. 11 avr. 2019 à 17:24, Enrico Zini <enrico at debian.org> a écrit :
> Package: libjs-popper.js
> Version: 1.14.6+ds2-1
> Severity: important
>
> Hello,
>
> these toplevel scripts:
>
> /usr/share/javascript/popper.js/popper.js
> /usr/share/javascript/popper.js/popper.min.js
>
> contain an export definition that doesn't seem to be standard
> JavaScript:
>
> $ tail /usr/share/javascript/popper.js/popper.js
> …
> export default Popper;
>
> and indeed, using them in a browser raises an exception:
>
> Uncaught SyntaxError: Unexpected token export
>
> Using the umd/ versions work:
>
> /usr/share/javascript/popper.js/umd/popper.js
> /usr/share/javascript/popper.js/umd/popper.min.js
>
> I find this to be surprising behaviour, as I'd expect the toplevel
> versions to be valid JavaScript, and other fancy things to be in
> subdirectories, but I'm happy to stand corrected.
>
The top level files should indeed be removed, leaving just the two
directories
- esm stands for "es6 modules" which are the future format, very cool,
though as far as i know is not supported anywhere without some explicit
experimental flag.
- umd stands for "universal modules" and works everywhere
Jérémy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20190411/04786ffe/attachment.html>
More information about the Pkg-javascript-devel
mailing list