diff --git a/src/core/tree.ts b/src/core/tree.ts index 31a3a93f3..bb28f4fa6 100644 --- a/src/core/tree.ts +++ b/src/core/tree.ts @@ -31,7 +31,7 @@ export class TreeLeaf { } /** - * Adds a path to the tree + * Adds a path to the tree. `path` cannot start with a `/`. * * @param path - route path of the file * @param filePath - file path, defaults to path for convenience and testing diff --git a/src/core/treeLeafValue.ts b/src/core/treeLeafValue.ts index fafe2dabf..3d96f3cae 100644 --- a/src/core/treeLeafValue.ts +++ b/src/core/treeLeafValue.ts @@ -1,5 +1,5 @@ -import { RouteMeta, RouteRecordName } from 'vue-router' -import { joinPath, trimExtension } from './utils' +import { RouteMeta } from 'vue-router' +import { joinPath } from './utils' export const enum TreeLeafType { static, diff --git a/src/index.ts b/src/index.ts index 67b1ba6b5..e4d8aceed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,6 +76,7 @@ export default createUnplugin((opt, meta) => { } }) +export { createRoutesContext } export { getFileBasedRouteName, getPascalCaseRouteName } from './core/utils' export type {