mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
- Implemented ExamStageActions component to manage actions related to exam booking and payment based on application status. - Added mock-base-query for development, providing a partial mock backend for various API endpoints. - Introduced mock-data for simulating responses in the mock-base-query, covering profiles, vessels, applications, licenses, exams, and notifications.
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
|
|
export default defineConfig({
|
|
root: __dirname,
|
|
// Env lives at the workspace root, shared with the portal — without this
|
|
// Vite looks in apps/backoffice and VITE_BASE_API_URL silently falls back to
|
|
// its built-in default.
|
|
envDir: '../../',
|
|
cacheDir: '../../node_modules/.vite/apps/backoffice',
|
|
server: {
|
|
port: 4201,
|
|
host: 'localhost',
|
|
},
|
|
preview: { port: 4201, host: 'localhost' },
|
|
plugins: [react(), nxViteTsPaths()],
|
|
resolve: {
|
|
dedupe: ['react', 'react-dom', 'react-router-dom', '@tanstack/react-query'],
|
|
alias: {
|
|
// The vendored user-management UI pulls in file-type → token-types,
|
|
// which imports `node:buffer`. Point it at the browser polyfill so the
|
|
// production build resolves it instead of failing on a Node built-in.
|
|
'node:buffer': 'buffer',
|
|
},
|
|
},
|
|
define: {
|
|
// `buffer` expects a `global` binding that browsers do not provide.
|
|
global: 'globalThis',
|
|
},
|
|
build: {
|
|
outDir: '../../dist/apps/backoffice',
|
|
emptyOutDir: true,
|
|
reportCompressedSize: true,
|
|
},
|
|
});
|