🔧(frontend) add conditional sourcemap generation for error tracking
Enable sourcemaps via env variable to link Sentry/PostHog exceptions to source code. Enable by default for DINUM frontend image to improve debugging capabilities.
This commit is contained in:
committed by
aleb_the_flash
parent
9e57c25a25
commit
053e4bc7b9
@@ -17,6 +17,7 @@ FROM frontend-deps AS meet-builder
|
||||
WORKDIR /home/frontend
|
||||
|
||||
ENV VITE_APP_TITLE="Visio"
|
||||
ENV VITE_BUILD_SOURCEMAP="true"
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd())
|
||||
return {
|
||||
plugins: [react(), tsconfigPaths()],
|
||||
build: {
|
||||
sourcemap: env.VITE_BUILD_SOURCEMAP === 'true',
|
||||
},
|
||||
server: {
|
||||
port: parseInt(env.VITE_PORT) || 3000,
|
||||
host: env.VITE_HOST ?? 'localhost',
|
||||
|
||||
Reference in New Issue
Block a user