From f7d2f6fdac764b7721b315b8da2ae8aa8c8d364c Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 15 Dec 2022 11:47:11 +0800 Subject: [PATCH] Enable source map and split vendor chunk --- vite.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vite.config.js b/vite.config.js index 53b43051..f4b5207e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,11 +1,12 @@ import preact from '@preact/preset-vite'; import { resolve } from 'path'; -import { defineConfig } from 'vite'; +import { defineConfig, splitVendorChunkPlugin } from 'vite'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [preact()], + plugins: [preact(), splitVendorChunkPlugin()], build: { + sourcemap: true, rollupOptions: { input: { main: resolve(__dirname, 'index.html'),