@astroscope/boot 0.6.0 → 0.6.1

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/index.cjs CHANGED
@@ -220,7 +220,10 @@ async function resolveWarmupFiles(patterns, projectRoot) {
220
220
  }
221
221
  function generateWarmupCode(files) {
222
222
  if (files.length === 0) return "";
223
- return `${files.map((f) => `import ${JSON.stringify(f)};`).join("\n")}
223
+ const imports = files.map((f) => ` import(${JSON.stringify(f)})`).join(",\n");
224
+ return `await Promise.allSettled([
225
+ ${imports},
226
+ ]);
224
227
  `;
225
228
  }
226
229
 
package/dist/index.js CHANGED
@@ -147,7 +147,10 @@ async function resolveWarmupFiles(patterns, projectRoot) {
147
147
  }
148
148
  function generateWarmupCode(files) {
149
149
  if (files.length === 0) return "";
150
- return `${files.map((f) => `import ${JSON.stringify(f)};`).join("\n")}
150
+ const imports = files.map((f) => ` import(${JSON.stringify(f)})`).join(",\n");
151
+ return `await Promise.allSettled([
152
+ ${imports},
153
+ ]);
151
154
  `;
152
155
  }
153
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astroscope/boot",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Startup and graceful shutdown hooks for Astro SSR",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",