Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.

Errors in FF and Safari using UglifyJS #21

Closed
alexreardon opened this issue Oct 23, 2016 · 7 comments · Fixed by #24
Closed

Errors in FF and Safari using UglifyJS #21

alexreardon opened this issue Oct 23, 2016 · 7 comments · Fixed by #24
Assignees

Comments

@alexreardon
Copy link

When running skate-web-components through UglifyJS I am getting a run time exception in firefox and safari.

It seems like it is erroring out in the following dependency: https://github.com/Benvie/WeakMap

@alexreardon
Copy link
Author

It looks like this is related to #18

@alexreardon
Copy link
Author

We are using the standard webpack uglifyJS plugin:

plugins: [
  new webpack.optimize.UglifyJsPlugin({
        compress: {
            warnings: false,
        },
        output: {
            comments: true,
        },
    }),
]

@adevnadia
Copy link
Contributor

You can temporarily fix it by setting mangle: false, compress: false in this plugin.

@treshugart
Copy link
Member

Spoke to @alexreardon IRL and they are using latest, but this is still an issue.

@jpnelson jpnelson self-assigned this Oct 27, 2016
@jpnelson
Copy link
Contributor

The problem is in weakmap – it uses Function.prototype.name

You can workaround it now by putting:

mangle: {
    keep_fnames: true,
}

in your config, but we'll release a new version with a better weakmap dependency.

@alexreardon
Copy link
Author

Is this all good now josh?

@jpnelson
Copy link
Contributor

jpnelson commented Nov 7, 2016

Yes, should be! If it's not let me know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants