From aa1cafd70a64fd9f4fd8e67d148ba102672edd2a Mon Sep 17 00:00:00 2001 From: April Hall Date: Sat, 15 Feb 2025 23:54:03 -0500 Subject: [PATCH] build: Remove close plugin Removes the custom close plugin, because preventing the DB from trying to connect during the build stopped the issue of the build hanging. --- src/lib/functions/autoCloseViteBuild.ts | 23 ----------------------- svelte.config.js | 3 --- vite.config.ts | 5 +++-- 3 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 src/lib/functions/autoCloseViteBuild.ts diff --git a/src/lib/functions/autoCloseViteBuild.ts b/src/lib/functions/autoCloseViteBuild.ts deleted file mode 100644 index 6079622..0000000 --- a/src/lib/functions/autoCloseViteBuild.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { PluginOption } from 'vite'; - -export default function closePlugin() { - const plugin: PluginOption = { - name: 'BuildWatcher', - buildEnd: function (error?: Error) { - if (error) { - console.error('\x1b[35m[BuildWatcher]\x1b[0m Error building.'); - console.error(error); - process.exit(1); - } else { - console.log('\x1b[35m[BuildWatcher]\x1b[0m Build Stage Ended.'); - } - }, - - closeBundle: function () { - console.log('\x1b[35m[BuildWatcher]\x1b[0m Bundle closed'); - process.exit(0); - }, - }; - - return plugin; -} diff --git a/svelte.config.js b/svelte.config.js index 45dec3c..a9692c1 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -12,9 +12,6 @@ const config = { // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. adapter: adapter(), - alias: { - '@/*': './path/to/lib/*', - }, }, }; diff --git a/vite.config.ts b/vite.config.ts index 41c30ec..83bf1ea 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,12 +1,10 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; import { startupSocketIOServer } from './src/lib/functions/websocketConfig'; -import closePlugin from './src/lib/functions/autoCloseViteBuild'; export default defineConfig({ plugins: [ sveltekit(), - closePlugin(), { name: 'integratedSocketIOServer', configureServer(server) { @@ -20,4 +18,7 @@ export default defineConfig({ server: { allowedHosts: true, }, + build: { + chunkSizeWarningLimit: 500, + }, });