Enable source map and split vendor chunk

This commit is contained in:
Lim Chee Aun 2022-12-15 11:47:11 +08:00
parent 2485bb945d
commit f7d2f6fdac

View file

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