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`
This commit is contained in:
Daniel Lockyer 2023-11-15 09:51:52 +01:00 committed by Daniel Lockyer
parent ec5b766aaa
commit ee804fc7af
8 changed files with 8 additions and 0 deletions

View File

@ -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()

View File

@ -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()
],

View File

@ -34,6 +34,7 @@ const externalPlugin = ({externals}: { externals: Record<string, string> }): Plu
// https://vitejs.dev/config/
export default (function viteConfig() {
return defineConfig({
logLevel: process.env.CI ? 'info' : 'warn',
plugins: [
svgr(),
react(),

View File

@ -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)

View File

@ -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(),

View File

@ -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),

View File

@ -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(),

View File

@ -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)