Files
ontime/apps/client/vite.config.js
T
Carlos Valente 7456205b6e V2 build (#319)
* chore: build pipeline for v2

* chore: run unit tests

* chore: configure sentry build
2023-04-01 23:06:42 +02:00

46 lines
1018 B
JavaScript

import sentryVitePlugin from '@sentry/vite-plugin';
import react from '@vitejs/plugin-react';
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import svgrPlugin from 'vite-plugin-svgr';
import { ONTIME_VERSION } from './src/ONTIME_VERSION';
const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN;
const isLocal = process.env.NODE_ENV === 'local';
export default defineConfig({
plugins: [
react(),
svgrPlugin(),
!isLocal &&
sentryVitePlugin({
org: 'get-ontime',
project: 'ontime',
include: './build',
authToken: sentryAuthToken,
release: ONTIME_VERSION,
deploy: {
env: 'production',
},
}),
],
server: {
port: 3000,
},
test: {
globals: true,
setupFiles: './src/setupTests.js',
environment: 'jsdom',
},
build: {
outDir: './build',
sourcemap: true,
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
});