Skip to content

Plugin loader can't parse local ES6 files #4037

@m-allanson

Description

@m-allanson

I'm still pulling on this thread that leads to #3889, and I think this is the cause of the bug mentioned here.

This function attempts to resolve a site's plugins, which is generally 👍.

However, the current site's gatsby-node.js, gatsby-ssr.js and gatsby-browser.js files could have things like import statements in them. Which will cause resolvePluginModule's require() checks to fail (when they should pass), leaving us with an inaccurate list of which plugins implement which APIs.

That in turn means that the later checks for things like bad API exports and duplicated API exports won't work correctly.

@KyleAMathews (or anyone else 😄) do you have any thoughts on how to handle this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions