Skip to content

Commit

Permalink
Works in dev, works in prod?
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviocv committed Dec 7, 2024
1 parent d55b336 commit 213a1a6
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ import { resolve } from 'path';
import { defineConfig } from 'vitest/config';
import { sveltekit } from '@sveltejs/kit/vite';

export default defineConfig({
plugins: [sveltekit()],
resolve: {
alias: {
$fonts: resolve('./static/fonts')
}
},
export default defineConfig(({mode}) => {
return {
plugins: [sveltekit()],

test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
resolve: {
alias: {
$fonts: (mode == "production") ? resolve('./static/fonts') : "/fonts"
}
},

test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}

};
});

0 comments on commit 213a1a6

Please sign in to comment.