mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-29 01:59:48 +08:00
chore: only add sentry plugin when building from release package
This commit is contained in:
parent
bdaa3b16ff
commit
faffc78abc
3 changed files with 17 additions and 13 deletions
|
@ -141,15 +141,17 @@ export default {
|
|||
],
|
||||
},
|
||||
}),
|
||||
sentryVitePlugin({
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
org: "monkeytype",
|
||||
project: "frontend",
|
||||
release: {
|
||||
name: buildClientVersion(),
|
||||
},
|
||||
applicationKey: "monkeytype-frontend",
|
||||
}),
|
||||
process.env.SENTRY
|
||||
? sentryVitePlugin({
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
org: "monkeytype",
|
||||
project: "frontend",
|
||||
release: {
|
||||
name: buildClientVersion(),
|
||||
},
|
||||
applicationKey: "monkeytype-frontend",
|
||||
})
|
||||
: null,
|
||||
replace([
|
||||
{
|
||||
filter: /firebase\.ts$/,
|
||||
|
@ -246,7 +248,7 @@ export default {
|
|||
},
|
||||
],
|
||||
build: {
|
||||
sourcemap: true,
|
||||
sourcemap: process.env.SENTRY,
|
||||
emptyOutDir: true,
|
||||
outDir: "../dist",
|
||||
assetsInlineLimit: 0, //dont inline small files as data
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { execSync } from "child_process";
|
||||
// idk why its failing to resolve
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import { Octokit } from "@octokit/rest";
|
||||
import { execSync } from "child_process";
|
||||
import dotenv from "dotenv";
|
||||
import fs, { readFileSync } from "fs";
|
||||
import readlineSync from "readline-sync";
|
||||
|
@ -174,7 +176,7 @@ const buildProject = () => {
|
|||
}
|
||||
|
||||
runProjectRootCommand(
|
||||
"npx turbo lint test validate-json build " + filter + " --force"
|
||||
"SENTRY=1 npx turbo lint test validate-json build " + filter + " --force"
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
},
|
||||
"@monkeytype/frontend#build": {
|
||||
"dependsOn": ["^build"],
|
||||
"env": ["BACKEND_URL", "RECAPTCHA_SITE_KEY"],
|
||||
"env": ["BACKEND_URL", "RECAPTCHA_SITE_KEY", "SENTRY"],
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"@monkeytype/frontend#dev": {
|
||||
|
|
Loading…
Add table
Reference in a new issue