-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
FIles imported from symlinked folders are treated different then others #2553
Comments
Also, when trying to run the build script, it throws this error
This file is written in ES6 using Update |
Hmm, that's odd! |
Thanks for looking into this. If you need a reproducable demo, just ping me. 👍 |
I'm afraid but "want it to work" @Timer means we should crash (since we don't currently support this use case). So not sure if it will help you 😛 |
Yeah, to clarify we'd basically make symlinks within I did not mean to imply we'd try compiling these sources (unless that's something we should do (?)). That seems more of a webpack-specific thing, however. |
The same issue mentioned here #3547 |
Finally I found a workaround. You can run a watch process to compile your shared library and use it as symlink in your project. Here is my gist. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Description
I'm currently facing problems with importing files from symlinked folders.
Consider this example filestructure
/core/Player.js
/client/src/components/Game.js
When having this file in
/client/src/lib
everything works fine, but when moving the file to the subfoldercore
, which is a symlink to the root of the project, things start to break.I'm unfortunately still trying to figure out, what exactly goes wrong, but it must have to do with the webpack configuration, I think. Importing normal configuration objects from this symlink work like a charm, but something is happening (or not happening), when importing classes.
When importing from
/client/src/lib
console.log outputs the following:While, when importing from the symlink
/client/src/lib/core
console.log outputs the following:Expected behavior
Since I'm technically still in
/src
I would expect that the code is treated the same way, even though I'm importing from a symlinked folder.Actual behavior
So some compiling doesn't happen, when importing from symlinks. Is this correct? Should this happen?
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):node -v
:v6.11.0
npm -v
:3.10.10
Then, specify:
Reproducible Demo
Will provide a demo if needed.
The text was updated successfully, but these errors were encountered: