Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UglifyJs breaks when using symlinked directory #3650

Closed
nuthinking opened this issue Dec 27, 2017 · 3 comments
Closed

UglifyJs breaks when using symlinked directory #3650

nuthinking opened this issue Dec 27, 2017 · 3 comments

Comments

@nuthinking
Copy link

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!

@nuthinking
Copy link
Author

Looks like I wasn't the only one facing this issue: #2553 and https://stackoverflow.com/questions/42942000/using-create-react-app-and-having-es6-dependencies

@nuthinking
Copy link
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.

@Timer
Copy link
Contributor

Timer commented Dec 27, 2017

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.

@Timer Timer closed this as completed Dec 27, 2017
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants