feat(routes): automatically generate routes based on files #1789
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the router configuration across multiple files and packages, primarily focusing on the integration of
unplugin-vue-router
and the removal of custom router logic. The most important changes include the addition ofunplugin-vue-router
, updates to the router setup in various files, and the removal of custom router-related code.Router Integration and Configuration:
apps/desktop/electron.vite.config.ts
: Imported and configuredunplugin-vue-router
for the desktop application. [1] [2]apps/web/vite.config.ts
: Addedunplugin-vue-router
to the web application's Vite configuration.apps/desktop/package.json
: Updatedvue-router
to version^4.4.5
and addedunplugin-vue-router
as a dependency. [1] [2]apps/web/package.json
: Updatedvue-router
to version^4.4.5
and addedunplugin-vue-router
as a dependency. [1] [2]Router Setup Updates:
apps/desktop/src/renderer/src/main.ts
: Replaced the custom router setup with the new router from./router
.apps/desktop/src/renderer/src/router.ts
: Created a new router configuration file usingunplugin-vue-router
with route redirection and hot module replacement.apps/web/src/main.ts
: Updated the main file to use the new router setup.apps/web/src/router.ts
: Added a new router configuration file similar to the desktop setup.Removal of Custom Router Logic:
packages/ui/src/router/index.ts
: Removed the custom router logic and component resolution functions.packages/ui/src/router/routes.json
: Deleted the custom routes JSON file.packages/ui/src/router/__test__/router.test.ts
: Removed the test file for the custom router logic.TypeScript Configuration:
apps/desktop/tsconfig.web.json
: Includedtyped-router.d.ts
for TypeScript configuration.apps/web/tsconfig.app.json
: Includedtyped-router.d.ts
for TypeScript configuration.