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.
This commit is contained in:
April Hall 2025-02-15 23:54:03 -05:00
parent eec5fc94ea
commit aa1cafd70a
Signed by: arithefirst
GPG Key ID: 4508A15C4DB91C5B
3 changed files with 3 additions and 28 deletions

View File

@ -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;
}

View File

@ -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/*',
},
},
};

View File

@ -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,
},
});