Skip to content

Commit

Permalink
fix: broken web build (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeharding authored Nov 13, 2024
1 parent 1f60fc7 commit 6ec93e4
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import legacy from "@vitejs/plugin-legacy";
import react from "@vitejs/plugin-react";
import wyw from "@wyw-in-js/vite";
import { omitBy } from "es-toolkit";
import { ManifestOptions, VitePWA } from "vite-plugin-pwa";
import svgr from "vite-plugin-svgr";
import { defineConfig } from "vitest/config";
Expand Down Expand Up @@ -88,16 +87,12 @@ export default defineConfig({
},
},
},
// vite panics on empty strings
define: omitBy(
{
APP_VERSION: JSON.stringify(process.env.npm_package_version),
APP_BUILD: process.env.APP_BUILD && JSON.stringify(process.env.APP_BUILD),
APP_GIT_REF: JSON.stringify(process.env.APP_GIT_REF),
BUILD_FOSS_ONLY: !!process.env.BUILD_FOSS_ONLY,
},
(v) => !v,
),
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
APP_BUILD: JSON.stringify(process.env.APP_BUILD ?? ""),
APP_GIT_REF: JSON.stringify(process.env.APP_GIT_REF ?? ""),
BUILD_FOSS_ONLY: !!process.env.BUILD_FOSS_ONLY,
},
test: {
exclude: ["**/e2e/**", "**/node_modules/**"],
globals: true,
Expand Down

0 comments on commit 6ec93e4

Please sign in to comment.