Skip to content

Commit

Permalink
feat: allow auto types
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jan 18, 2024
1 parent 1cf14f8 commit 2d1dd2a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,40 @@
"module": "dist/vue-router.mjs",
"types": "dist/vue-router.d.ts",
"exports": {
"./auto-routes": {
"types": "./vue-router-auto-routes.d.ts",
"node": {
"import": {
"production": "./dist/vue-router.node.mjs",
"development": "./dist/vue-router.node.mjs",
"default": "./dist/vue-router.node.mjs"
},
"require": {
"production": "./dist/vue-router.prod.cjs",
"development": "./dist/vue-router.cjs",
"default": "./index.js"
}
},
"import": "./dist/vue-router.mjs",
"require": "./index.js"
},
"./auto": {
"types": "./vue-router-auto.d.ts",
"node": {
"import": {
"production": "./dist/vue-router.node.mjs",
"development": "./dist/vue-router.node.mjs",
"default": "./dist/vue-router.node.mjs"
},
"require": {
"production": "./dist/vue-router.prod.cjs",
"development": "./dist/vue-router.cjs",
"default": "./index.js"
}
},
"import": "./dist/vue-router.mjs",
"require": "./index.js"
},
".": {
"types": "./dist/vue-router.d.ts",
"node": {
Expand Down Expand Up @@ -47,6 +81,8 @@
"index.js",
"dist/*.{js,cjs,mjs}",
"dist/vue-router.d.ts",
"vue-router-auto.d.ts",
"vue-router-auto-routes.d.ts",
"vetur/tags.json",
"vetur/attributes.json",
"README.md"
Expand Down
4 changes: 4 additions & 0 deletions packages/router/vue-router-auto-routes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Array of routes generated by unplugin-vue-router
*/
export const routes: any[]
4 changes: 4 additions & 0 deletions packages/router/vue-router-auto.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Extended by unplugin-vue-router to create typed routes.
*/
export interface RouteNamedMap {}

0 comments on commit 2d1dd2a

Please sign in to comment.