dazzle icon indicating copy to clipboard operation
dazzle copied to clipboard

Error building with UglifyJS: "Super expression must either be null or a function, not defined"

Open samsch opened this issue 5 years ago • 5 comments

Dupe of #49 & #51, but with reproduction: https://github.com/samsch/test-dazzle

I forked and modified the build to fix this. https://github.com/samsch/dazzle/tree/1.4.0-cjs

There's no real need to build with Webpack for CommonJS modules, none of the features in the config are being used, so this does the build with just Babel and outputs the compiled modules to dist/.

You can directly install from the .tzg file attached to the release to get this fix now.

npm i https://github.com/samsch/dazzle/releases/download/1.4.0-cjs/react-dazzle-1.4.0.tgz

I changed the package main to point to dist/index.js, but the package also includes the umd build as dist/dazzle.min.js.

samsch avatar Sep 04 '18 15:09 samsch

Thank you for the repro. I will look at it and see what we can do about the umd builds. Feel free to make a PR from your fork.

pcross616 avatar Sep 04 '18 16:09 pcross616

We are also experiencing this issue. Getting an actual version with a fix would be great

repl-andrew-ovens avatar Oct 29 '18 20:10 repl-andrew-ovens

I also found this issue.

jazarja avatar Jan 25 '19 12:01 jazarja

I also had the issue upgrading my project. I hope a new version with this fix comes out

sudo-tee avatar Feb 18 '19 19:02 sudo-tee

@samsch Could you create a pull request with your changes?

cjc343 avatar Jul 26 '19 20:07 cjc343