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

when using npm linked repos, loaders that accept files in node_modules have to be installed locally to all repos #2442

Closed
seansfkelley opened this issue May 6, 2016 · 2 comments
Labels

Comments

@seansfkelley
Copy link

Discovered this along with #2441, so you can see a repro at the same repo: https://github.com/seansfkelley/node-modules-alias-loader-bug under "bonus bug".

Summary: if you want to do local development across multiple repos and so have npm linked them together, any loaders that accept files in node_modules/ (such as source-map-loader, which is explicitly intended for this purpose) must also be installed in each linked repo. This is is unexpected, sine the linked repo may not even use Webpack. It should only be necessary in the root repo, which is the one actually running Webpack.

@sokra
Copy link
Member

sokra commented May 6, 2016

This is fixed for webpack 2, as configured loaders in configuration resolve relative to the configuration instead of relative to the resource.

@sokra sokra closed this as completed May 6, 2016
@seansfkelley
Copy link
Author

Good to hear! Is it possible to get a backport to Webpack 1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants