Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.
This repository was archived by the owner on Apr 21, 2021. It is now read-only.

Compatibility Error with Terser (and the simple fix) #95

@AlexMViver

Description

@AlexMViver

When compiling an angular app that uses terser for production use the following error occurs compiling ThreeBox code:

Error: main.1a5fcd07c173571f6663.js from Terser Unexpected token: name (static) [main.1a5fcd07c173571f6663.js:5215,28] at js_error (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:538:11) at croak (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1251:9) at token_error (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1259:9) at unexpected (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1265:9) at Object.add_parameter (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1736:33) at binding_element (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1993:29) at parameter (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1800:17) at parameters (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1774:25) at _function_body (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:2047:19) at function_ (C:\Users\Alex\Documents\Lapr5\SPA\node_modules\terser\dist\bundle.min.js:1698:20)

Although I do not know terser's behavior the error is simply resolved by changing the variable 'static' name to another (non-reserved token) name.

The referred variable is located in src/objects/objects.js in the addMethods function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions