Compare commits

...

3 Commits

Author SHA1 Message Date
Danny Avila
3b4a0517e9 chore: Remove ClosePlugin from Vite config 2024-08-28 13:00:01 -04:00
Danny Avila
08d2a88e70 chore: close plugin 2024-08-28 11:33:23 -04:00
Danny Avila
be2abf09cc chore: install/declare rollup at latest, update vite precache 2024-08-28 11:15:39 -04:00
4 changed files with 62 additions and 1 deletions

View File

@@ -130,6 +130,7 @@
"postcss": "^8.4.31",
"postcss-loader": "^7.1.0",
"postcss-preset-env": "^8.2.0",
"rollup": "^4.21.1",
"tailwindcss": "^3.4.1",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4",

View File

@@ -0,0 +1,22 @@
export default function ClosePlugin() {
return {
name: 'ClosePlugin', // required, will show up in warnings and errors
// use this to catch errors when building
buildEnd(error) {
if(error) {
console.error('Error bundling')
console.error(error)
process.exit(1)
} else {
console.log('Build ended')
}
},
// use this to catch the end of a build without errors
closeBundle(id) {
console.log('Bundle closed')
process.exit(0)
},
}
}

View File

@@ -4,6 +4,7 @@ import { VitePWA } from 'vite-plugin-pwa';
import { defineConfig, createLogger } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import type { Plugin } from 'vite';
import ClosePlugin from './vite-plugin-close.ts'
const logger = createLogger();
const originalWarning = logger.warn;
@@ -61,7 +62,7 @@ export default defineConfig({
},
workbox: {
globPatterns: ['assets/**/*.{png,jpg,svg,ico}', '**/*.{js,css,html,ico,woff2}'],
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024,
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024,
},
manifest: {
name: 'LibreChat',
@@ -96,6 +97,7 @@ export default defineConfig({
},
}),
sourcemapExclude({ excludeNodeModules: true }),
ClosePlugin(),
],
publicDir: './public',
build: {

36
package-lock.json generated
View File

@@ -1221,6 +1221,7 @@
"postcss": "^8.4.31",
"postcss-loader": "^7.1.0",
"postcss-preset-env": "^8.2.0",
"rollup": "^4.21.1",
"tailwindcss": "^3.4.1",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4",
@@ -1229,6 +1230,41 @@
"vite-plugin-pwa": "^0.19.8"
}
},
"client/node_modules/rollup": {
"version": "4.21.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.1.tgz",
"integrity": "sha512-ZnYyKvscThhgd3M5+Qt3pmhO4jIRR5RGzaSovB6Q7rGNrK5cUncrtLmcTTJVSdcKXyZjW8X8MB0JMSuH9bcAJg==",
"dev": true,
"dependencies": {
"@types/estree": "1.0.5"
},
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
"node": ">=18.0.0",
"npm": ">=8.0.0"
},
"optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.21.1",
"@rollup/rollup-android-arm64": "4.21.1",
"@rollup/rollup-darwin-arm64": "4.21.1",
"@rollup/rollup-darwin-x64": "4.21.1",
"@rollup/rollup-linux-arm-gnueabihf": "4.21.1",
"@rollup/rollup-linux-arm-musleabihf": "4.21.1",
"@rollup/rollup-linux-arm64-gnu": "4.21.1",
"@rollup/rollup-linux-arm64-musl": "4.21.1",
"@rollup/rollup-linux-powerpc64le-gnu": "4.21.1",
"@rollup/rollup-linux-riscv64-gnu": "4.21.1",
"@rollup/rollup-linux-s390x-gnu": "4.21.1",
"@rollup/rollup-linux-x64-gnu": "4.21.1",
"@rollup/rollup-linux-x64-musl": "4.21.1",
"@rollup/rollup-win32-arm64-msvc": "4.21.1",
"@rollup/rollup-win32-ia32-msvc": "4.21.1",
"@rollup/rollup-win32-x64-msvc": "4.21.1",
"fsevents": "~2.3.2"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",