@skgo/sveltekit-adapter 0.13.0 → 0.13.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/package.json +1 -1
- package/skgo-adapter.js +5 -3
package/package.json
CHANGED
package/skgo-adapter.js
CHANGED
|
@@ -207,8 +207,10 @@ export default function skgo({ out = 'build', precompress = true } = {}) {
|
|
|
207
207
|
checkRemoteIds(`${out}/client`, generated.remotes, hashes);
|
|
208
208
|
|
|
209
209
|
builder.writePrerendered(`${out}/prerendered`);
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
if (existsSync(`${out}/prerendered`)) {
|
|
211
|
+
for (const file of walk(`${out}/prerendered`)) {
|
|
212
|
+
if (file.endsWith('.html')) authorizePrerenderedScripts(file);
|
|
213
|
+
}
|
|
212
214
|
}
|
|
213
215
|
const prerendered = readPrerendered(builder);
|
|
214
216
|
// The SPA shell is still emitted: it is what a page whose branch turns
|
|
@@ -241,7 +243,7 @@ export default function skgo({ out = 'build', precompress = true } = {}) {
|
|
|
241
243
|
// `precompress: true` default.
|
|
242
244
|
if (precompress) {
|
|
243
245
|
await builder.compress(`${out}/client`);
|
|
244
|
-
await builder.compress(`${out}/prerendered`);
|
|
246
|
+
if (existsSync(`${out}/prerendered`)) await builder.compress(`${out}/prerendered`);
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
// `builder` has no writeJson in kit 3.0.0-next.27 (it existed on the
|