vite-plugin-react-pages
vite-plugin-react-pages copied to clipboard
Support React 18?
Whether consider support React 18?
Yes!
Is it coming soon? I'm using vite-plugin-react-pages to custom my starter-vite-react-library[WIP], and it's not easy to integrate with PageStrategy as my mind 😂
What problem do you encounter with PageStrategy
? It is related to React 18?
Is this doc helpful to you? https://vitejs.github.io/vite-plugin-react-pages/advanced-fs-routing
(I am also planning to write Chinese translation of document: https://github.com/vitejs/vite-plugin-react-pages/issues/74)
What problem do you encounter with
PageStrategy
? It is related to React 18?
No, just react-dom warning in console. Convention over configuration, maybe provide a official PageStrategy auto load page data is better. like: https://d.umijs.org/guide/basic
Convention over configuration, maybe provide a official PageStrategy auto load page data is better. like: https://d.umijs.org/guide/basic
Agreed. Currently the default "convention" is only suitable for app. I should provide a PageStrategy
that can be reused by library developer. dumi is indeed a great project to learn from.
Maybe I can do something for the repo, is there a roadmap?
That would be greate! Contributions are very welcome. You can start with writing (or improve) playground and template to satisfy specific needs of users. For example, your library template would be a great demo for users that want to create a library. Currently our library template is not very practical because it doesn't include build scripts to build the library (it only have scripts to run and build demo). The demo document site is also not very practical. We can use vite-pages to build sites that has features like docusaurus.io, d.umijs.org, storybook.js.org. They are greate examples of document sites. We can also bring those feature to improve vite-pages document site. By doing that, we can know what features are missing and valuable for users, and implement them in the theme-doc or vite-pages-core. Hopefully, you will be familiar with this repo by then, and be able to implement those features! If you want to start with a concrete feature, you can try to implement docuement search in the theme doc. Anyway, your ideas and discussions about missing feature is already great help for this project!
Building this project have helped me to learn many things like vite, ssr, docusaurus, github ci...... It let me learn by implementing. Hopefully it can help you too.
is there a roadmap?
I use issues to track TODO (clear feature demand) . I have some vague ideas in my mind (such as more powerful demo rendering like storybook.js, better TS interface info extraction), but they are not clearly designed yet.
Great, start with my lib template is good idea, but there is a question, how to integrate with my template, I will improve it continuously. By init script or others?
Great, start with my lib template is good idea, but there is a question, how to integrate with my template, I will improve it continuously. By init script or others?
You can continue improve your template in your repo. And when it is ready, we can add a build script before publishing create-vite-pages ("scripts: {"pull-template-lib": "script to pull template from you repo into this repo..."}"
) to pull your template into this package.
So where to place pull-template-lib
script? I'm not understand.
In the package.json of create-vite-pages:
https://github.com/vitejs/vite-plugin-react-pages/blob/main/packages/create-project/package.json
I will run the script before publishing the package.
I just updated the url in the previous comment. Sorry for the broken url 😂
Got it. I'm working on it now, the aim today is working as my expected routes 😂
@csr632 Is it updated?
@csr632 Is it updated?
Sorry for the delay! I haven't implement it because of lack of time. But since somebody have request for it, I will put more priority on it. I will implement this in a week.
@csr632 How long will it take for React Router 6 + React 18 to release a version,
@csr632 How long will it take for React Router 6 + React 18 to release a version,
I am working on a update that:
- upgrade react to 18.x (will fix this issue)
- upgrade react-router to 6.x (will fix https://github.com/vitejs/vite-plugin-react-pages/issues/72)
- upgrade mdx to 2.x (will fix https://github.com/vitejs/vite-plugin-react-pages/issues/69)
And it will be a new major version. I will release an alpha version this week.
@csr632 Thanks for your hard work,If it is successful, please tell me, I will always pay attention
It's done! Currently it is published in an alpha version. Check it out: https://github.com/vitejs/vite-plugin-react-pages/pull/96