From 0081afc24ef6df1db3df712544e75ddb3e42e423 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Thu, 21 Mar 2024 13:03:58 +0100 Subject: [PATCH] (nuxt) do not typecheck on nuxt build in production (speeds up deployment and reduces memory usage) move ts-node to dependencies as the cron jobs use this and yarn install in production env does not install dev dependencies explicitely disable sentry when SENTRY_DSN is not set to prevent further warnings --- nuxt.config.ts | 7 +++---- package.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index fb7998e6b..34919f4d0 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -178,10 +178,8 @@ const nuxtConfig: NuxtConfig = { buildModules: [ '@nuxt/typescript-build', ], - loaders: { - ts: { - configFile: path.resolve(__dirname, 'tsconfig.json'), - }, + typescript: { + typeCheck: process.env.NODE_ENV !== 'production', }, modules: [ '@privyid/nuxt-csrf', @@ -220,6 +218,7 @@ const nuxtConfig: NuxtConfig = { enableAutoPageviews: false, }, sentry: { + disabled: !process.env.SENTRY_DSN, tracing: { tracesSampleRate: 0.1, browserTracing: { diff --git a/package.json b/package.json index 4249ddbeb..5d5914847 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "sqlite": "^4.0.12", "sqlite3": "^5.1.6", "suml": "^0.2.2", + "ts-node": "^10.9.2", "twitter": "^1.7.1", "ulid": "^2.3.0", "uuid": "^8.3.2", @@ -130,7 +131,6 @@ "suml-loader": "^0.1.1", "ts-jest": "^29.1.1", "ts-json-schema-generator": "^1.5.0", - "ts-node": "^10.9.2", "typescript": "^5.3.3", "vue-tsc": "^1.8.27", "webpack": "^4.47.0",