File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,14 @@ import {
1010 writeFileSync
1111} from 'node:fs' ;
1212import { join } from 'node:path' ;
13+ import { fileURLToPath } from 'node:url' ;
1314
1415// This download the currente Vite template from Github, adjusts it to our needs, and saves it to static/svelte-template.json
1516// This is used by the Svelte REPL as part of the "download project" feature
1617
1718const force = process . env . FORCE_UPDATE === 'true' ;
18- const output_file = ' static/svelte-template.json';
19- const output_dir = 'scripts /svelte-template';
19+ const output_file = fileURLToPath ( new URL ( '../ static/svelte-template.json', import . meta . url ) ) ;
20+ const output_dir = fileURLToPath ( new URL ( '. /svelte-template', import . meta . url ) ) ;
2021
2122try {
2223 if ( ! force && statSync ( output_file ) ) {
4041
4142 // add what we need
4243 mkdirSync ( join ( output_dir , 'public' ) ) ;
43- copyFileSync ( 'static/favicon.png' , join ( output_dir , 'public/favicon.png' ) ) ;
44+ copyFileSync (
45+ fileURLToPath ( new URL ( '../static/favicon.png' ) ) ,
46+ join ( output_dir , 'public/favicon.png' )
47+ ) ;
4448
4549 // build svelte-app.json
4650 const files = [ ] ;
You can’t perform that action at this time.
0 commit comments