Skip to content

Commit e987eef

Browse files
committed
fix: windows paths
1 parent bfa5a54 commit e987eef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/astro/src/vite-plugins/astro-swap-functions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
* This is temporary solution and can break at any time when end-user's update their `astro` version.
44
*/
55
import { createRequire } from 'node:module';
6-
import { resolve } from 'node:path';
6+
import { resolve, join } from 'node:path';
77
import type { VitePlugin } from '../types.js';
88

99
const require = createRequire(import.meta.url);
10-
const astroDist = resolve(require.resolve('astro/package.json'), '..');
11-
const swapFunctionEntry = resolve(astroDist, 'dist/transitions/swap-functions.js');
10+
const astroDist = resolve(require.resolve(join('astro', 'package.json')), '..');
11+
const swapFunctionEntry = join(astroDist, 'dist', 'transitions', 'swap-functions.js');
1212

1313
const virtualModuleId = 'tutorialkit:astro-swap-functions';
1414
const resolvedId = `\0${virtualModuleId}`;

0 commit comments

Comments
 (0)