Files
imphnen-frontend-service/apps/qrcampaign/vite.config.mts
T
Hafid NurandGitHub 9d37cba65f Add a new app: QR code generator for campaign (#75)
* Initialize a new NX project - QR campaign

* Develop QR code generator app for campaign

* Add deployment script

Add Dockerfile, docker compose, and update Nix config for deployment

* Revert package.json to fix ci

* Revert package-lock.json to ensure ci (Nix build & cache) successful
2026-02-14 17:15:46 +07:00

44 lines
1.2 KiB
TypeScript

/// <reference types='vitest' />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
export default defineConfig(() => ({
root: import.meta.dirname,
cacheDir: '../../node_modules/.vite/apps/qrcampaign',
server: {
port: 3008,
host: 'localhost',
},
preview: {
port: 3008,
host: 'localhost',
},
plugins: [react(), nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
build: {
outDir: '../../dist/apps/qrcampaign',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
test: {
name: 'qrcampaign',
watch: false,
globals: true,
environment: 'jsdom',
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
reporters: ['default'],
coverage: {
reportsDirectory: '../../coverage/apps/qrcampaign',
provider: 'v8' as const,
},
},
}));