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

Backport preserve-symlinks fix to [email protected] for webpack@1 #45

Closed
vjpr opened this issue Oct 25, 2016 · 6 comments
Closed

Backport preserve-symlinks fix to [email protected] for webpack@1 #45

vjpr opened this issue Oct 25, 2016 · 6 comments

Comments

@vjpr
Copy link

vjpr commented Oct 25, 2016

@sokra Could we get a backport to enhanced-resolve@~0.9?

create-react-app depends on [email protected] which depends on enhanced-resolve@~0.9 and when installing with pnpm to a global symlinked store (the fastest way to install deps currently and what yarn may support eventually), it does not work.

@wclr
Copy link

wclr commented Mar 21, 2017

I believe this is the solution:
https://webpack.js.org/configuration/resolve/#resolve-symlinks

@qiyuan-wang
Copy link

qiyuan-wang commented Jun 19, 2017

@whitecolor this solution won't work because it only deals with the first-level symlink.

When requiring a symlink package in inside a symlink package (like npminstall does, it installs all level dependencies in the form of symlink), it would throw a error of 'Module not found'.

I have a simple workaround for it: adding the root path to the config's resolve.modules. It works but slow down the building process.

We need a better way to solve this problem.

@wclr
Copy link

wclr commented Jun 19, 2017

We need a better way to solve this problem.

Not using symlinks? 😄

@zkochan
Copy link

zkochan commented Jun 19, 2017

pnpm does not use the --preserve-symlinks flag anymore, so if webpack uses the same resolution algorithm that Node uses (which is resolving symlinks to real path), then it should work fine with pnpm.

I believe this is the solution:
https://webpack.js.org/configuration/resolve/#resolve-symlinks

Maybe this could help with the issue described here?

@zkochan
Copy link

zkochan commented Jun 19, 2017

I just checked today and the latest pnpm works fine with the latest CRA. @vjpr could you recheck and confirm. In that case, I believe this can be closed

@vjpr
Copy link
Author

vjpr commented Jun 19, 2017

Yeh this issue was only webpack@1 related.

@vjpr vjpr closed this as completed Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants