Enable source map and split vendor chunk

pull/1/head
Lim Chee Aun 2022-12-15 11:47:11 +08:00
rodzic 2485bb945d
commit f7d2f6fdac
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

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