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:
parent
eec5fc94ea
commit
aa1cafd70a
@ -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;
|
||||
}
|
@ -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/*',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user