Skip to content

"unused" option in uglifyjs webpack prod config behaves unexpectedly #5044

Closed
@jslegers

Description

@jslegers

Is this a bug report?

Yes

Steps to Reproduce

  1. Install app
  2. run dev server
  3. build app
  4. run build

Expected Behavior

Both the dev code & the built code should behave the same.

Actual Behavior

Some of the built code behaved incorrectly.

More specifically, some WebGL code generated with Emscripten did not behave as expected in the built code.

In my app, I expected to see this :
Image of Yaktocat

Instead, I saw this :
Image of Yaktocat

Setting the "unused" flag to "false" fixes this problem.

Demo

A demo app can be found at https://github.com/jslegers/luciadria-react-app.

Unfortunately, this demo requires LuciadRIA as a local dependency, and unfortunately I'm not allowed to share this code as it is proprietary. However, it should give an idea of what I'm trying to achieve.

Considering the behavior of the "unused" flag is unreliable, it makes sense to set it's default value to "false", like the "comparisons" flag.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions