Make a custom directory accessible to GatsbyJS for development and build #13503
Labels
stale?
Issue that may be closed soon due to the original author not responding any more.
type: question or discussion
Issue discussing or asking a question about Gatsby
I have GatsbyJS set up within a large monorepo with two different builds using a shared components set. The structure is as following:
The issue is this: I can access the
shared
components directory to import and use React components and logic in both GatsbyJS site and other site (native React) just fine, only that they contain images with src using a regularsrc=/assets/images/...
tag, not ES6 imports. Obviously, they won't work in both development or built version in the Gatsby site.What's the easiest solution to 1) make the
assets
directory visible to Gatsby and 2) copy these files (preferably only the used ones...) tostatic
folder in the built version?Best,
Maciek
The text was updated successfully, but these errors were encountered: