bun-plugin-stx 0.2.294 → 0.2.296

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/serve.d.ts CHANGED
@@ -246,6 +246,7 @@ export declare interface ServeOptions {
246
246
  cssCacheLimit?: number
247
247
  prewarmRenderCache?: boolean | number
248
248
  imageWarmupGraceMs?: number
249
+ imageWarmup?: boolean
249
250
  publicDir?: string
250
251
  quiet?: boolean
251
252
  autoIncrementPort?: boolean | number
package/dist/serve.js CHANGED
@@ -9210,6 +9210,7 @@ async function serve(options) {
9210
9210
  markPlaceholdersReady = resolve13;
9211
9211
  });
9212
9212
  let placeholdersAreReady = false;
9213
+ const imageWarmupEnabled = (options.imageWarmup ?? stxConfig.imageWarmup ?? true) !== false;
9213
9214
  const imageWarmupGraceMs = Math.max(0, options.imageWarmupGraceMs ?? 1000);
9214
9215
  function awaitImageWarmup() {
9215
9216
  if (placeholdersAreReady || imageWarmupGraceMs === 0)
@@ -10281,6 +10282,11 @@ ${block}`;
10281
10282
  });
10282
10283
  }
10283
10284
  async function runImageWarmup() {
10285
+ if (!imageWarmupEnabled) {
10286
+ placeholdersAreReady = true;
10287
+ markPlaceholdersReady();
10288
+ return;
10289
+ }
10284
10290
  try {
10285
10291
  const stx = await stxModule;
10286
10292
  const publicRoot = nodePath.resolve(process19.cwd(), publicDir);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bun-plugin-stx",
3
3
  "type": "module",
4
- "version": "0.2.294",
4
+ "version": "0.2.296",
5
5
  "description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",