mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-03 05:54:22 +08:00
fix deployment
This commit is contained in:
parent
100bca75aa
commit
e5afb0565b
2 changed files with 7 additions and 4 deletions
|
|
@ -12,11 +12,11 @@
|
|||
"dep-graph": "madge -c -i \"dep-graph.png\" ./src/ts",
|
||||
"ts-check": "tsc --noEmit",
|
||||
"build": "npm run madge && vite build",
|
||||
"build-dev": "npm run madge && vite build --mode development",
|
||||
"build-tribedev": "npm run madge && vite build --mode tribedev",
|
||||
"madge": " madge --circular --extensions ts ./src",
|
||||
"start": "vite preview --port 3000",
|
||||
"dev": "vite dev",
|
||||
"deploy-dev": "npm run check-assets && npm run build-dev && firebase deploy --only hosting",
|
||||
"deploy-tribedev": "npm run check-assets && npm run build-tribedev && firebase deploy --only hosting",
|
||||
"test": "vitest run",
|
||||
"test-coverage": "vitest run --coverage",
|
||||
"dev-test": "concurrently --kill-others \"vite dev\" \"vitest\"",
|
||||
|
|
|
|||
|
|
@ -30,9 +30,12 @@ import UnpluginInjectPreload from "unplugin-inject-preload/vite";
|
|||
import { KnownFontName } from "@monkeytype/schemas/fonts";
|
||||
|
||||
export default defineConfig(({ mode }): UserConfig => {
|
||||
const env = loadEnv(mode, process.cwd(), "");
|
||||
// Load .env.tribedev when mode is 'tribedev'
|
||||
const envFile = mode === "tribedev" ? ".env.tribedev" : "";
|
||||
const env = loadEnv(mode, process.cwd(), ["", envFile]);
|
||||
|
||||
const useSentry = env["SENTRY"] !== undefined;
|
||||
const isDevelopment = mode !== "production";
|
||||
const isDevelopment = mode !== "production" && mode !== "tribedev";
|
||||
|
||||
if (!isDevelopment) {
|
||||
if (env["RECAPTCHA_SITE_KEY"] === undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue