File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
packages/qwik-city/src/adapters/shared/vite Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @builder.io/qwik-city ' : patch
3+ ---
4+
5+ Fix: SSG sometimes hangs after completion, now we forcibly exit the SSG process when this happens.
Original file line number Diff line number Diff line change @@ -202,6 +202,34 @@ export function viteAdapter(opts: ViteAdapterPluginOptions) {
202202 `\n==============================================`
203203 ) ;
204204 }
205+ if ( opts . ssg !== null ) {
206+ /**
207+ * HACK: for some reason the build hangs after SSG. `why-is-node-running` shows 4
208+ * culprits:
209+ *
210+ * ```
211+ * There are 4 handle(s) keeping the process running.
212+ *
213+ * # CustomGC
214+ * ./node_modules/.pnpm/lightningcss@1.30.1/node_modules/lightningcss/node/index.js:20 - module.exports = require(`lightningcss-${parts.join('-')}`);
215+ *
216+ * # CustomGC
217+ * ./node_modules/.pnpm/@tailwindcss+oxide@4.1.12/node_modules/@tailwindcss/oxide/index.js:229 - return require('@tailwindcss/oxide-linux-x64-gnu')
218+ *
219+ * # Timeout
220+ * node_modules/.vite-temp/vite.config.timestamp-1755270314169-a2a97ad5233f9.mjs:357
221+ * ./node_modules/.pnpm/vite@7.1.2_@types+node@24.3.0_jiti@2.5.1_lightningcss@1.30.1_terser@5.43.1_tsx@4.20.4_yaml@2.8.1/node_modules/vite/dist/node/chunks/dep-CMEinpL-.js:36657 - return (await import(pathToFileURL(tempFileName).href)).default;
222+ *
223+ * # CustomGC
224+ * ./packages/qwik/dist/optimizer.mjs:1328 - const mod2 = module.default.createRequire(import.meta.url)(`../bindings/${triple.platformArchABI}`);
225+ * ```
226+ *
227+ * For now, we'll force exit the process after SSG with some delay.
228+ */
229+ setTimeout ( ( ) => {
230+ process . exit ( 0 ) ;
231+ } , 5000 ) . unref ( ) ;
232+ }
205233 }
206234 } ,
207235 } ,
You can’t perform that action at this time.
0 commit comments