From ee804fc7af2f60f726993867581f93cb7d4828b3 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 15 Nov 2023 09:51:52 +0100 Subject: [PATCH] Hidden "info" Vite output unless in CI refs https://github.com/TryGhost/DevOps/issues/104 - `info` is very verbose as it prints all files and their sizes - we often don't care about this, so we can do away with `info` in favor of `warn` --- apps/admin-x-design-system/vite.config.ts | 1 + apps/admin-x-framework/vite.config.ts | 1 + apps/admin-x-settings/vite.config.ts | 1 + apps/announcement-bar/vite.config.js | 1 + apps/comments-ui/vite.config.ts | 1 + apps/portal/vite.config.js | 1 + apps/signup-form/vite.config.ts | 1 + apps/sodo-search/vite.config.js | 1 + 8 files changed, 8 insertions(+) diff --git a/apps/admin-x-design-system/vite.config.ts b/apps/admin-x-design-system/vite.config.ts index 2942416c43..118183752e 100644 --- a/apps/admin-x-design-system/vite.config.ts +++ b/apps/admin-x-design-system/vite.config.ts @@ -7,6 +7,7 @@ import {defineConfig} from 'vitest/config'; // https://vitejs.dev/config/ export default (function viteConfig() { return defineConfig({ + logLevel: process.env.CI ? 'info' : 'warn', plugins: [ svgr(), react() diff --git a/apps/admin-x-framework/vite.config.ts b/apps/admin-x-framework/vite.config.ts index b1bfd329cf..349a3df7d6 100644 --- a/apps/admin-x-framework/vite.config.ts +++ b/apps/admin-x-framework/vite.config.ts @@ -6,6 +6,7 @@ import {defineConfig} from 'vitest/config'; // https://vitejs.dev/config/ export default (function viteConfig() { return defineConfig({ + logLevel: process.env.CI ? 'info' : 'warn', plugins: [ react() ], diff --git a/apps/admin-x-settings/vite.config.ts b/apps/admin-x-settings/vite.config.ts index 7d0eeea0cf..f2ab4dc1da 100644 --- a/apps/admin-x-settings/vite.config.ts +++ b/apps/admin-x-settings/vite.config.ts @@ -34,6 +34,7 @@ const externalPlugin = ({externals}: { externals: Record }): Plu // https://vitejs.dev/config/ export default (function viteConfig() { return defineConfig({ + logLevel: process.env.CI ? 'info' : 'warn', plugins: [ svgr(), react(), diff --git a/apps/announcement-bar/vite.config.js b/apps/announcement-bar/vite.config.js index bd5b31d0d3..c3a360fa43 100644 --- a/apps/announcement-bar/vite.config.js +++ b/apps/announcement-bar/vite.config.js @@ -11,6 +11,7 @@ export default defineConfig((config) => { const outputFileName = pkg.name[0] === '@' ? pkg.name.slice(pkg.name.indexOf('/') + 1) : pkg.name; return { + logLevel: process.env.CI ? 'info' : 'warn', clearScreen: false, define: { 'process.env.NODE_ENV': JSON.stringify(config.mode) diff --git a/apps/comments-ui/vite.config.ts b/apps/comments-ui/vite.config.ts index f41855fb6e..52d7a3f4f2 100644 --- a/apps/comments-ui/vite.config.ts +++ b/apps/comments-ui/vite.config.ts @@ -11,6 +11,7 @@ const outputFileName = pkg.name[0] === '@' ? pkg.name.slice(pkg.name.indexOf('/' // https://vitejs.dev/config/ export default (function viteConfig() { return defineConfig({ + logLevel: process.env.CI ? 'info' : 'warn', plugins: [ svgr(), react(), diff --git a/apps/portal/vite.config.js b/apps/portal/vite.config.js index b628963829..8890ea371d 100644 --- a/apps/portal/vite.config.js +++ b/apps/portal/vite.config.js @@ -14,6 +14,7 @@ export default defineConfig((config) => { const outputFileName = pkg.name[0] === '@' ? pkg.name.slice(pkg.name.indexOf('/') + 1) : pkg.name; return { + logLevel: process.env.CI ? 'info' : 'warn', clearScreen: false, define: { 'process.env.NODE_ENV': JSON.stringify(config.mode), diff --git a/apps/signup-form/vite.config.ts b/apps/signup-form/vite.config.ts index b7c2b8e97c..9fca8f1d85 100644 --- a/apps/signup-form/vite.config.ts +++ b/apps/signup-form/vite.config.ts @@ -11,6 +11,7 @@ const outputFileName = pkg.name[0] === '@' ? pkg.name.slice(pkg.name.indexOf('/' // https://vitejs.dev/config/ export default (function viteConfig() { return defineConfig({ + logLevel: process.env.CI ? 'info' : 'warn', plugins: [ svgr(), react(), diff --git a/apps/sodo-search/vite.config.js b/apps/sodo-search/vite.config.js index fd51530075..52d8e243e6 100644 --- a/apps/sodo-search/vite.config.js +++ b/apps/sodo-search/vite.config.js @@ -12,6 +12,7 @@ export default defineConfig((config) => { const outputFileName = pkg.name[0] === '@' ? pkg.name.slice(pkg.name.indexOf('/') + 1) : pkg.name; return { + logLevel: process.env.CI ? 'info' : 'warn', clearScreen: false, define: { 'process.env.NODE_ENV': JSON.stringify(config.mode)