79802833

Date: 2025-10-28 13:03:19
Score: 2.5
Natty:
Report link

Great answer https://stackoverflow.com/a/76920975/14600377

And this is for SvelteKit if someone needs

function closeBundle(): Plugin {
    let vite_config: ResolvedConfig
    return {
        name: 'ClosePlugin',
        configResolved(config) {
            vite_config = config;
        },
        closeBundle: {
            sequential: true,
            async handler() {
                if (!vite_config.build.ssr) return;
                process.exit(0)
            }
        }
    }
}
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Gornostay25