mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
There were recently a few breaking changes introduced into SvelteKit. This PR clones that latest changes from a demo SvelteKit application, while retaining support for Vercel Analytics. Deployed latest to https://sveltekit-template.vercel.app/ and confirmed analytics are sending.
12 lines
267 B
JavaScript
12 lines
267 B
JavaScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
/** @type {import('vite').UserConfig} */
|
|
const config = {
|
|
plugins: [sveltekit()],
|
|
define: {
|
|
'import.meta.env.VERCEL_ANALYTICS_ID': JSON.stringify(process.env.VERCEL_ANALYTICS_ID)
|
|
}
|
|
};
|
|
|
|
export default config;
|