File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import adapter from '@sveltejs/adapter-static' ;
22import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' ;
3+ import { readFileSync } from 'node:fs' ;
4+ import { fileURLToPath } from 'node:url' ;
5+
6+ const file = fileURLToPath ( new URL ( 'package.json' , import . meta. url ) ) ;
7+ const json = readFileSync ( file , 'utf8' ) ;
8+ const { version } = JSON . parse ( json ) ;
39
410/** @type {import('@sveltejs/kit').Config } */
511const config = {
@@ -11,7 +17,10 @@ const config = {
1117 // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1218 // If your environment is not supported or you settled on a specific environment, switch out the adapter.
1319 // See https://kit.svelte.dev/docs/adapters for more information about adapters.
14- adapter : adapter ( )
20+ adapter : adapter ( ) ,
21+ version : {
22+ name : version
23+ }
1524 }
1625} ;
1726
Original file line number Diff line number Diff line change 11import adapter from '@sveltejs/adapter-static' ;
22import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' ;
3+ import { readFileSync } from 'node:fs' ;
4+ import { fileURLToPath } from 'node:url' ;
5+
6+ const file = fileURLToPath ( new URL ( 'package.json' , import . meta. url ) ) ;
7+ const json = readFileSync ( file , 'utf8' ) ;
8+ const { version } = JSON . parse ( json ) ;
39
410/** @type {import('@sveltejs/kit').Config } */
511const config = {
@@ -11,7 +17,10 @@ const config = {
1117 // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1218 // If your environment is not supported or you settled on a specific environment, switch out the adapter.
1319 // See https://kit.svelte.dev/docs/adapters for more information about adapters.
14- adapter : adapter ( )
20+ adapter : adapter ( ) ,
21+ version : {
22+ name : version
23+ }
1524 }
1625} ;
1726
You can’t perform that action at this time.
0 commit comments