Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

exclude the generated assets from the routes #21

Closed
Albert-Gao opened this issue Sep 28, 2022 · 2 comments
Closed

exclude the generated assets from the routes #21

Albert-Gao opened this issue Sep 28, 2022 · 2 comments

Comments

@Albert-Gao
Copy link

image

the generated folder is from relay compiler, which always create the codegen close to the route which uses GraphQL query.

the way next.js handles this is to add a property for the ignored folder name:

https://nextjs.org/docs/advanced-features/compiler#relay

image

Can we have something like this here?

I think, maybe we can make it an array, so we can have multiple paths being ignored rather than just ignoring the codegen folder.

@EvanBacon
Copy link
Contributor

Based on the linked docs, it seems like this writes the generated files outside of the pages directory, then the Next.js server redirects the request somehow.

@jesuscovam
Copy link

maybe in the implementation of getRecursiveTree or contextModuleToFileNodes we could add a filter for an excludePaths array, but we would also need to remove these files from the bundle

@expo expo locked and limited conversation to collaborators Feb 9, 2023
@EvanBacon EvanBacon converted this issue into discussion #271 Feb 9, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants