Skip to content

Commit

Permalink
update vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Dec 7, 2024
1 parent 0f2f966 commit 2cf74a5
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { defineConfig, loadEnv } from 'vite';
import { resolve } from 'node:path';
import { sveltekit } from '@sveltejs/kit/vite';
import * as v from 'valibot';
Expand All @@ -14,22 +15,23 @@ const schema = v.object({
),
});

/** @type {import('vite').UserConfig} */
const config = {
plugins: [
mkcert(),
valibot(schema, {
ignoreEnvPrefix: true,
transformValues: true,
}),
sveltekit()
],
resolve: {
alias: {
$components: resolve('./src/components'),
$meta: resolve('./src/meta.json'),
}
}
};
export default defineConfig(({ mode }) => {
loadEnv(mode, process.cwd(), '');

export default config;
return {
plugins: [
mkcert(),
valibot(schema, {
ignoreEnvPrefix: true,
transformValues: true,
}),
sveltekit()
],
resolve: {
alias: {
$components: resolve('./src/components'),
$meta: resolve('./src/meta.json'),
}
}
};
});

0 comments on commit 2cf74a5

Please sign in to comment.