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

Fix hierarchy of directories to look for loaders and modules #435

Merged
merged 1 commit into from
Sep 9, 2016

Conversation

KyleAMathews
Copy link
Contributor

This fixes two longstanding problems.

First that starters had to ship with modules/utilities that Gatsby
already included and second that installing a starter with NPM 2 often
has problems.

I did some more research into this and realized the problem is that we
don't tell Gatsby to look in /node_modules/gatsby/node_modules to look
for modules and loaders. This means the starter also has to install them
(especially with NPM 2 which doesn't put dependencies of dependencies at
top-level of node_modules like NPM 3 does).

By telling Webpack to look in Gatsby's node_modules directory as well we
should be able to elimintate extra dependencies from starters as well as
fix intermittent NPM 2 problems.

This fixes two longstanding problems.

First that starters had to ship with modules/utilities that Gatsby
already included and second that installing a starter with NPM 2 often
has problems.

I did some more research into this and realized the problem is that we
don't tell Gatsby to look in `/node_modules/gatsby/node_modules` to look
for modules and loaders. This means the starter also has to install them
(especially with NPM 2 which doesn't put dependencies of dependencies at
top-level of node_modules like NPM 3 does).

By telling Webpack to look in Gatsby's node_modules directory as well we
should be able to elimintate extra dependencies from starters as well as
fix intermittent NPM 2 problems.
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

Successfully merging this pull request may close these issues.

1 participant