restructure for sveltekit
This commit is contained in:
parent
7deea47857
commit
9ef27fd2a2
73 changed files with 469 additions and 28 deletions
|
@ -1,7 +1,17 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import { readFileSync } from 'fs';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const packageFile = fileURLToPath(new URL('package.json', import.meta.url));
|
||||
const packageData = readFileSync(packageFile, 'utf8');
|
||||
const packageJSON = JSON.parse(packageData);
|
||||
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [svelte()],
|
||||
})
|
||||
plugins: [sveltekit()],
|
||||
define: {
|
||||
APP_VERSION: JSON.stringify(packageJSON.version)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue