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(gatsby): Allow "gatsby-node" directory for Parcel Compilation #36712

Merged

Conversation

graysonhicks
Copy link
Contributor

Description

Since v4.9 Gatsby added TS support to top-level gatsby-* files. Users often used a gatsby-node directory to organize lifecycle hooks, which were then imported in to gatsby-* files. An unintended regression of the Parcel compiling code was that gatsby-node directories were marked as misnamed (meant to catch issues like gatsby-node.tsx) with this error:

image

This error is extra confusing because the user does have a gatsby-node.js/ts file.

Users encountered this on minor upgrades from < 4.9 to > 4.9 if they had a gatsby-node directory.

Documentation

Documentation is here and shouldn't have to change.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 29, 2022
@LekoArts LekoArts added topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Oct 5, 2022
@LekoArts LekoArts changed the title add check for gatsby-node directory and tests in parcel compilation fix(gatsby): Allow "gatsby-node" directory for Parcel Compilation Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants