Skip to content

Commit

Permalink
build: update sandbox vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jan 4, 2024
1 parent 4b59018 commit 064f8b4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions apps/sandbox/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import {createViteConfig} from '@myparcel-do/build-vite';
import {defineConfig} from 'vitest/config';
import customTsConfig from 'vite-plugin-custom-tsconfig';
import vue from '@vitejs/plugin-vue';

export const PORT = 9860;

const dirname = new URL('.', import.meta.url).pathname;

export default createViteConfig((env) => {
export default defineConfig((env) => {
const isProd = env.mode === 'production';

return {
plugins: [vue(), customTsConfig({tsConfigPath: 'tsconfig.base.json'})],

base: isProd ? '/delivery-options/' : '/',

server: {
Expand All @@ -27,6 +31,14 @@ export default createViteConfig((env) => {

test: {
setupFiles: [`${dirname}/../delivery-options/src/__tests__/vitest-setup.ts`],
coverage: {
all: true,
enabled: false,
reporter: ['clover', 'text'],
},
environment: 'happy-dom',
include: ['src/**/*.spec.ts'],
passWithNoTests: true,
},
};
});

0 comments on commit 064f8b4

Please sign in to comment.