metacubexd/vite.config.ts

19 lines
505 B
TypeScript
Raw Normal View History

import { defineConfig, splitVendorChunkPlugin } from 'vite'
2023-09-01 17:08:00 +08:00
import { VitePWA } from 'vite-plugin-pwa'
2023-08-24 04:20:53 +08:00
import solidPlugin from 'vite-plugin-solid'
2023-09-03 18:16:09 +08:00
import pkgJSON from './package.json'
2023-08-24 04:20:53 +08:00
export default defineConfig({
base: './',
build: { chunkSizeWarningLimit: 1000 },
resolve: { alias: { '~': '/src' } },
2023-09-03 18:16:09 +08:00
define: {
'import.meta.env.version': JSON.stringify(pkgJSON.version),
},
2023-09-01 17:08:00 +08:00
plugins: [
solidPlugin(),
splitVendorChunkPlugin(),
VitePWA({ registerType: 'autoUpdate' }),
],
2023-08-24 04:20:53 +08:00
})