allow reading attachments even if the model is offline

This commit is contained in:
josc146
2023-11-24 16:25:21 +08:00
parent 645e8e2f44
commit 177b2c54d9
8 changed files with 879 additions and 89 deletions

View File

@@ -3,6 +3,7 @@ import { dependencies } from './package.json';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { visualizer } from 'rollup-plugin-visualizer';
import topLevelAwait from 'vite-plugin-top-level-await';
// dependencies that exist anywhere
const vendor = [
@@ -35,12 +36,18 @@ function renderChunks(deps: Record<string, string>) {
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(),
plugins: [
react(),
visualizer({
template: 'treemap',
gzipSize: true,
brotliSize: true
})],
}),
topLevelAwait({
promiseExportName: '__tla',
promiseImportName: i => `__tla_${i}`
})
],
build: {
chunkSizeWarningLimit: 3000,
rollupOptions: {