From b10a652d002da8fddf2dfe0607a40c26075a96f1 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Tue, 17 Sep 2024 16:56:38 +0200 Subject: [PATCH] minify code Signed-off-by: Julien Veyssier --- vite.config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index fc5c32b9a..d486754ba 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,6 +6,9 @@ import { createAppConfig } from '@nextcloud/vite-config' import eslint from 'vite-plugin-eslint' import stylelint from 'vite-plugin-stylelint' +console.error('process.env.NODE_ENV', process.env.NODE_ENV) +const isProduction = process.env.NODE_ENV === 'production' + export default createAppConfig({ main: 'src/main.js', adminSettings: 'src/adminSettings.js', @@ -21,4 +24,5 @@ export default createAppConfig({ plugins: [eslint(), stylelint()], }, inlineCSS: { relativeCSSInjection: true }, + minify: isProduction, })