From d4845137bd70fae56b0d9273b7218e4404a853fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 23 Oct 2024 19:19:35 +0900 Subject: [PATCH] chore: add vite config example [ci skip] --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 10ab1356..f7d38d85 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,17 @@ Vue SFC REPL as a Vue 3 component. **Note: `@vue/repl` >= 2 now supports Monaco Editor, but also requires explicitly passing in the editor to be used for tree-shaking.** +```ts +// vite.config.ts +import { defineConfig } from 'vite' +export default defineConfig({ + optimizeDeps: { + exclude: ['@vue/repl'], + }, + // ... +}) +``` + ### With CodeMirror Editor Basic editing experience with no intellisense. Lighter weight, fewer network requests, better for embedding use cases.