When doing a regular es6 import I got the error SyntaxError: expected expression, got '<' Animated_GIF.worker:1.
This is due to the fact that the script is trying to load a missing webworker from the root and the index.html is served.
The default es6 is import Animated_GIF from 'animated_gif' but package.json main points to the src file which does not have the webworker combined.
One solution is to point to the correct file with import Animated_GIF from 'animated_gif/dist/Animated_GIF.min'. The other is to update the package.json main.
I could do a pull request but do I update package.json or update README.md with the correct es6 import? The former would require an npm publish as well.
ps: npm install node_modules should only contain the dist js, it might be wise to add files to package.json as well.
When doing a regular es6 import I got the error
SyntaxError: expected expression, got '<' Animated_GIF.worker:1.This is due to the fact that the script is trying to load a missing webworker from the root and the
index.htmlis served.The default es6 is
import Animated_GIF from 'animated_gif'butpackage.jsonmain points to the src file which does not have the webworker combined.One solution is to point to the correct file with
import Animated_GIF from 'animated_gif/dist/Animated_GIF.min'. The other is to update thepackage.jsonmain.I could do a pull request but do I update
package.jsonor updateREADME.mdwith the correct es6 import? The former would require annpm publishas well.ps: npm install node_modules should only contain the dist js, it might be wise to add
filestopackage.jsonas well.