Skip to content

Uglify settings break library code #136

@dignifiedquire

Description

@dignifiedquire

I have some crypto library code that when I include it breaks due to the very agressive uglify settings here: https://github.com/developit/preact-cli/blob/master/src/lib/webpack-config.js#L405

Once I remove the unsafe_comps and unsafe options everything works fine. I know it's nice to get smaller code but maybe it would be good to disable unsafe options by default as I suspect that there are quite a few libraries out there that will break due to these optimisations. And this is especially hard to catch as tests usually run against dev builds and not against production builds.

#56 would allow me to workaround it, but I still feel that not breaking libraries should be rather the default and unsafe optimisations should be behind a flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions