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

TODO: fix user custom 404 page #45

Closed
csr632 opened this issue Jan 11, 2022 · 1 comment
Closed

TODO: fix user custom 404 page #45

csr632 opened this issue Jan 11, 2022 · 1 comment

Comments

@csr632
Copy link
Member

csr632 commented Jan 11, 2022

In this line:

const Comp404 = loadedData['/404']?.main?.default

Page data of /404 is not loaded yet, so Comp404 is always undefined. vite-pages should provide an api to let themes pull page data manually.

@csr632
Copy link
Member Author

csr632 commented Jan 12, 2022

vite-pages should provide an api to let themes pull page data manually.

After more consideration, I think vite-pages core itself don't need to provide more apis. User can pass 404 Component directly to theme directory via _theme.tsx and vite-pages core don't need to care about that. Users don't need to create a page named 404 any more.

Expose api for manually control page data would make server-side-generation more complex.

@csr632 csr632 closed this as completed in ab8d405 Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant