Skip to content

Commit 3c9e661

Browse files
authored
fix: update paths for playground (#9139)
1 parent d6f0981 commit 3c9e661

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

playgrounds/basic/start.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@ import path from 'node:path';
33
import { fileURLToPath } from 'node:url';
44
import { watch } from 'rollup';
55
import serve from 'rollup-plugin-serve';
6-
import * as svelte from '../svelte/src/compiler/index.js';
6+
import * as svelte from '../../packages/svelte/src/compiler/index.js';
77

88
const __dirname = fileURLToPath(new URL('.', import.meta.url));
9+
const runtime_path = path.resolve(__dirname, '../../packages/svelte/src/runtime');
910

1011
/** @returns {import('rollup').Plugin}*/
1112
function create_plugin(ssr = false) {
1213
return {
1314
name: 'custom-svelte-ssr-' + ssr,
1415
resolveId(id) {
1516
if (id === 'svelte') {
16-
return path.resolve(
17-
__dirname,
18-
ssr ? '../svelte/src/runtime/ssr.js' : '../svelte/src/runtime/index.js'
19-
);
17+
return path.resolve(runtime_path, ssr ? 'ssr.js' : 'index.js');
2018
} else if (id.startsWith('svelte/')) {
21-
return path.resolve(__dirname, `../svelte/src/runtime/${id.slice(7)}/index.js`);
19+
return path.resolve(runtime_path, `${id.slice(7)}/index.js`);
2220
}
2321
},
2422
transform(code, id) {

0 commit comments

Comments
 (0)