Skip to content

UglifyJs breaks when using symlinked directory #3650

Closed

Description

@nuthinking

As simpler solution to git submodules, I am sharing code with this app using a symlinked folder. The app runs perfectly in dev mode. But when I try to build it UglifyJs breaks with the following error (obscured):

Failed to compile.

static/js/main.95ce5432.js from UglifyJs
Unexpected token name «extends», expected punc «)» [../other-project/src/folder/file.js:3,0][static/js/main.95ce5432.js:551,63]

The app is built and works but main.x.js is not obfuscated/compressed.
The generated main.x.js still uses in fact the syntax class extends which I assume would only work in certain browsers and needs to be converted?
Even if I try to uglify manually main.x.js via terminal I get the same error.

Any idea how I could debug/fix this? Thanks a lot!

Activity

  1. nuthinking commented on Dec 27, 2017

    @nuthinking
    Author
  2. nuthinking commented on Dec 27, 2017

    @nuthinking
    Author

    my understanding is that in create-react-app is not possible to use symlinks to reference ES6 classes outside the src folder and that this use case won't be supported in the foreseeable future.

  3. Timer commented on Dec 27, 2017

    @Timer
    Contributor

    my understanding is that in create-react-app is not possible to use symlinks to reference ES6 classes outside the src folder and that this use case won't be supported in the foreseeable future.

    This is correct, sorry!

    I'll close this as a duplicate of #2553.

  4. locked and limited conversation to collaborators on Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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