From e368862e7fb37e1901d1448abe73dd87342715ab Mon Sep 17 00:00:00 2001 From: Axel Bocciarelli Date: Tue, 25 Jul 2023 15:27:09 +0200 Subject: [PATCH] Skip linting and type checking when building for production to save time --- apps/demo/vite.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/demo/vite.config.js b/apps/demo/vite.config.js index c7f8ad4d1..f23e68d1d 100644 --- a/apps/demo/vite.config.js +++ b/apps/demo/vite.config.js @@ -6,7 +6,11 @@ import eslintPlugin from 'vite-plugin-eslint'; export default defineConfig({ server: { open: true }, preview: { open: true }, - plugins: [react(), eslintPlugin(), checker({ typescript: true })], + plugins: [ + react(), + { ...eslintPlugin(), apply: 'serve' }, // dev only to reduce build time + { ...checker({ typescript: true }), apply: 'serve' }, // dev only to reduce build time + ], // `es2020` required by @h5web/h5wasm for BigInt `123n` notation support optimizeDeps: { esbuildOptions: { target: 'es2020' } },