-
-
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
Stop webpack from resolving symlinks to real folders #3695
Conversation
Webpack will not resolve symlinks to real folders This allows to symlink into 'src' folder https://github.com/facebookincubator/create-react-app/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+symlinks fixes: #3547 and others...
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
If this was a panacea wouldn't it be enabled by default in webpack itself? What are the tradeoffs and downsides of this? |
It seems that this option was added one year ago. Maybe it has default to true, to not break back compatibility. For Windows users can't have this I think. I can't find any downsides for now. Maybe folks from community know better what would break this. |
Having this, you could link uncompiled sources from outside of src into it, and have them compiled by Babel. |
For now I dont't see symlink as a solution. Starting to get more problems. |
Can you elaborate? Would be helpful for future attempts. |
I have to create 3 react apps (using create-react-app) with common frontend components. Some dependencies are as As my components sources are not compiled, installing I ejected Here comes styles/images/fonts 😃 . // src/scss/_buttons.scss
@import "~bootstrap/scss/buttons":
// ... my styles
// src/scss/_variables.scss
@import "~bootstrap/scss/variables":
// ... my vars
// src/font/font-faces.css
// src/font/font.ttf
// src/scss/bootstrap.scss
@import "../font/font-faces.css";
@import "variables";
@import "buttons";
// ... other imports In // src/index.scss
@import "~common/src/scss/bootstrap"; This import does not work. I have to make it relative to symlinked one In conclusion. As I already ejected
Also my coworkers that are mostly back end (Java) devs said that I am making kind of "bicycle" with all this symlinks. And would be better to compile I have to integrate all this into maven build process and CI process. |
All of this sounds like something that could be solved by #3741, no? |
Webpack will not resolve symlinks to real folders
This allows to symlink into
src
folderhttps://github.com/facebookincubator/create-react-app/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+symlinks
fixes: #3547 and others...
closes: #3689