Open History to see the last commit
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',
12)
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'),
18}
19β
20export function resolvePackageEntryPath(packageName: string): string {
21 return fileURLToPath(import.meta.resolve(packageName))
22}