Forcing Gatsby to exclude one component in /pages

Viewed 19

I have a submodule I'm trying to include in my Gatsby Project. The submodule passes html into an iframe which is then used on the site.

When I build my project, everything works as expected. When I access /component, gatsby resolves it via the path: /public/component/. It loads the correct html, generates the iframe, and everything is good to go.

When on development however, trying to access /component attempts to resolve by going to /pages/component, which is not correct.

Adding the submodule directly to pages doesn't work, because then it is forced to go through all of the minification/optimization and seems to cause other issues as well.

So I need some way to either force Gatsby to always to use /public/component even when running in development mode.

I've looked at pretty much everything I could find online and haven't been able to find any answers.

0 Answers
Related