Callqh patch 1 - #86
Conversation
Feature/router
Bumps [@farmfe/core](https://github.com/farm-fe/farm) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/farm-fe/farm/releases) - [Changelog](https://github.com/farm-fe/farm/blob/main/release-plz.toml) - [Commits](https://github.com/farm-fe/farm/compare/@farmfe/core@1.0.1...@farmfe/core@1.0.2) --- updated-dependencies: - dependency-name: "@farmfe/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…-1.0.2 chore(deps-dev): bump @farmfe/core from 1.0.1 to 1.0.2
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
测试一下 |
There was a problem hiding this comment.
Pull request overview
This PR updates the app template to use convention-based routing via vite-plugin-pages, modernizes the entry router setup, and adds tooling/config updates (deps + Dependabot + README).
Changes:
- Replace manual
react-routerroute setup withvite-plugin-pagesgenerated routes rendered viauseRoutes. - Add TypeScript module declarations for generated routes and configure
vite-plugin-pagesinfarm.config.ts. - Bump
@farmfe/coreand add Dependabot + README updates.
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Adjusts TS lib configuration (currently introduces invalid JSON). |
src/typings.d.ts |
Adds typings for ~react-pages / virtual generated routes modules. |
src/router/routers.tsx |
Removes the previous manual createBrowserRouter setup. |
src/main.tsx |
Removes the previous Main component entry implementation. |
src/main.css |
Removes the previous main.css (styles appear moved under src/pages). |
src/index.tsx |
Switches app bootstrap to BrowserRouter + useRoutes(routes) with Suspense. |
farm.config.ts |
Adds vite-plugin-pages configuration and module id. |
package.json |
Bumps @farmfe/core version. |
pnpm-lock.yaml |
Lockfile updates corresponding to dependency bump. |
README.md |
Updates template documentation and lists vite-plugin-pages integration. |
.github/dependabot.yml |
Adds Dependabot configuration for npm dependencies. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| vitePlugins:[ | ||
| Pages({ | ||
| resolver:'react', | ||
| moduleId:"~react-pages", | ||
| }) | ||
| ] |
| import { createRoot } from 'react-dom/client'; | ||
| import { RouterProvider } from 'react-router-dom'; | ||
| import { BrowserRouter as Router, useRoutes } from 'react-router-dom'; | ||
| import routes from '~react-pages'; |
| --- | ||
|
|
||
| ## 使用 | ||
| 1. 将改仓库`Fork`到你的仓库中 |
| plugins: ['@farmfe/plugin-react'], | ||
| vitePlugins:[ | ||
| Pages({ | ||
| resolver:'react', | ||
| moduleId:"~react-pages", | ||
| }) | ||
| ] |
| const container = document.querySelector('#root'); | ||
| const root = createRoot(container); | ||
|
|
| --- | ||
|
|
||
| ## 使用 | ||
| 1. 将改仓库`Fork`到你的仓库中 |
Description:
BREAKING CHANGE:
Related issue (if exists):