-
Couldn't load subscription status.
- Fork 10.3k
feat(gatsby): handle graphql-import-node bundling #36951
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,6 +166,12 @@ export async function createGraphqlEngineBundle( | |
| test: /\.txt/, | ||
| type: `asset/resource`, | ||
| }, | ||
| { | ||
| test: /\.(graphqls?|gqls?)$/, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is to match |
||
| use: { | ||
| loader: require.resolve(`graphql-tag/loader`), | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| resolve: { | ||
|
|
@@ -180,6 +186,9 @@ export async function createGraphqlEngineBundle( | |
| lmdb: require.resolve(`lmdb`), | ||
| "ts-node": require.resolve(`./shims/ts-node`), | ||
| "gatsby-sharp$": require.resolve(`./shims/gatsby-sharp`), | ||
| "graphql-import-node$": require.resolve(`./shims/no-op-module`), | ||
| "graphql-import-node/register$": | ||
| require.resolve(`./shims/no-op-module`), | ||
| }, | ||
| }, | ||
| plugins: [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // no-op |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already being installed transitively (codegen deps eventually install it), so it's not adding new dependency and just makes sure package managers install it in a way that can be resolved from within
gatsbypackage