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

Dev/v4 #96

Merged
merged 143 commits into from Dec 27, 2022
Merged

Dev/v4 #96

merged 143 commits into from Dec 27, 2022

Conversation

csr632
Copy link
Member

@csr632 csr632 commented Nov 12, 2022

Changes

  • upgrade vite 4.x
  • upgrade react to 18.x
  • upgrade react-router to 6.x
  • upgrade mdx to 2.x
  • upgrade antd to 5.x
  • support markdown outline view and navigation
  • support search

Release plan

Wait for vite to release stable v4 to make sure vite-pages v4 is compatible with it.

Try it out

Live demos:

Or init project:

  • npm init vite-pages@alpha app-demo -- --template app
  • npm init vite-pages@alpha library-demo -- --template lib
  • npm init vite-pages@alpha library-monorepo-demo -- --template lib-monorepo

fix: #73
fix: #97
fix: #72
fix: #69
fix: #52

@csr632 csr632 merged commit 1f25d92 into main Dec 27, 2022
csr632 added a commit that referenced this pull request Dec 27, 2022
* init search

* refactor(theme-doc): share pageGroups analysis

* search data with group info

* improve name

* improve code style

* save work

* upgrade deps

* no loger need @types/react-router-dom

* upgrade react-dom usage

* update deps

* keep rollup version align with vite

* migrate to react-router v6

* fix ts error

* dev mode works

* tweak ssr

* run types-react-codemod

* fix ssr

* fix types

* simplify ssr config

* migrate DemoMdxPlugin to mdx 2.x

* TsInfoMdxPlugin works with mdx 2.x

* FileTextMdxPlugin works with mdx 2.x

* replace ImageMdxPlugin with remcohaszing/remark-mdx-images

* add comment

* fix routes and topBar links

* disable search for now

* remove theme-basic

* don't need linkBins

* chore: publish 4.0.0-alpha.0

* update create-project templates

* chore: publish 4.0.0-alpha.1

* fix optimizeDeps

* bump deps of templates

* fix mdx code tag render

* fix antd style

* chore: publish alpha

* works in node commonjs

* fix ssr issue: commonjs interop

* tweak test timout

* update pnpm.lock

* fix ci: taskkill error

https://pipelines.actions.githubusercontent.com/serviceHosts/994468f0-9514-4a95-bb54-d52b4298100c/_apis/pipelines/1/runs/209/signedlogcontent/5?urlExpires=2022-11-24T15%3A31%3A48.5125848Z&urlSigningMethod=HMACV1&urlSignature=ijfBRodz0%2FlGqMcPz3vwUYkLYFkU8vHeE2Lp2boZ2gk%3D

* prepare to analyze outline info (table of content) at buildtime

* tweak windows test ci

* improve test-setup

* fix ssr on windows

* fix typo

* outline info render

* chore: publish alpha

* fix outline render

* improve demo

* chore: publish alpha

* fix import error in cjs env

* chore: publish alpha

* simplify demos

* upgrade antd to 5.x

* tweak demo

* chore: publish alpha

* fix theme style

* chore: publish alpha

* fix test

* improve search

* fix anchor link when using hash router

* chore: publish alpha

* fix ts error

* chore: publish alpha

* fix build

* chore: publish alpha

* fix import allPagesOutlines

* chore: publish alpha

* fix build

* fix ci

* fix anchor link scroll

* improve demos

* chore: publish alpha

* fix cleanStaticData

* OutlineInfoModuleManager should skip update it outline info didn't changed

* headings (outlines) update should trigger hmr hot update instead of full reload

* chore: publish alpha

* make hmr works with mdx files

workaround this issue: vitejs/vite-plugin-react#38

* don't show loading state when:
- User navigates back to a loaded page.
- Hmr update during dev.

* improve file names

* fix path

* fix hydration layout change

* chore: publish alpha

* better name

* update jotai and remove local copy

* bundle client modules to reduce browser request during dev and avoid conflict npm package with users

* update pnpm lock

* jotai provider-less mode

* experiment

* chore: publish alpha

* don't need to build client with tsc; cleanup

* update deps

* fix ts error

* adapt to vite-plugin-react 3.0 breaking change: no longer do jsx transform to .md files

* upgrade playwright test

* chore: publish alpha

* fix warning of useLayoutEffect during ssr

* fix react warning

* publish alpha

* cleanup setup for doc

* cleanup

* warn for old mdx plugin

* update lock

* make setupPlugins the default export

* update setup

* improve vite setup

* improve vite setup

* update docs

* publish alpha

* prevent search popup scroll with page

* improve mdx setup

* fix outline layout

* improve search popup style on narrow screen

* publish alpha

* add an option to turn off search

* publish alpha

* cleanup deps

* improve antd ssr

* fix ssr hydrate style flash

* publish alpha

* react-pages should not couple on @ant-design/cssinjs

* alpha

* use a rollup plugin to add style import to output bundles

* implement a SSR plugin system to decouple vite-pages ssr from antd ssr steps

* publish alpha

* vite-pages-theme-doc have "type": "module"

* pub

* support ssr plugin to let user hook into the ssr process

* improve ssr plugin

* improve ssr plugin system: no longer need vite plugin

* improve ssr plugin

* fix ssr plugin

* fix outline style

* cleanup

* update deps

* remove vite-plugin-mdx

* fix cleanStaticData

* fix demo

* fix demos

* publish alpha

* update contributing guide

* feat: minify html for ssg mode (#102)

* feat: minify html for ssg

* chore: format

Co-authored-by: 阿良仔 <32487868+cijiugechu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants