Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

shared.ts

22 lines618 Bytes

1import { fileURLToPath } from 'node:url'
2import path from 'pathe'
3​
4const currentDir = path.dirname(fileURLToPath(import.meta.url))
5export const reactStartPluginDir = currentDir
6const defaultEntryDir = path.resolve(
7 currentDir,
8 '..',
9 '..',
10 'plugin',
11 'default-entry',
13​
14export const reactStartDefaultEntryPaths = {
15 client: path.resolve(defaultEntryDir, 'client.tsx'),
16 server: path.resolve(defaultEntryDir, 'server.ts'),
17 start: path.resolve(defaultEntryDir, 'start.ts'),
19​
20export function resolvePackageEntryPath(packageName: string): string {
21 return fileURLToPath(import.meta.resolve(packageName))