@eslym/sveltekit-adapter-bun 1.0.4 → 1.0.5
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.js +9 -1
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -226,6 +226,7 @@ function adapter(userOpts = {}) {
|
|
|
226
226
|
out: "./build",
|
|
227
227
|
transpileBun: false,
|
|
228
228
|
precompress: false,
|
|
229
|
+
exportPrerender: false,
|
|
229
230
|
websocketOptions: {},
|
|
230
231
|
staticIgnores: ["**/.*"],
|
|
231
232
|
...userOpts
|
|
@@ -310,6 +311,7 @@ function adapter(userOpts = {}) {
|
|
|
310
311
|
exportSetupCLI(tmp);
|
|
311
312
|
writeFileSync(`${tmp}/manifest.js`, `export const manifest = ${builder.generateManifest({ relativePath: "./" })};\n\n` + `export const prerendered = new Set(${JSON.stringify(builder.prerendered.paths)});\n`);
|
|
312
313
|
const pkg = JSON.parse(readFileSync("package.json", "utf8"));
|
|
314
|
+
builder.log.minor("Bundling...");
|
|
313
315
|
const bundle = await rollup({
|
|
314
316
|
input: {
|
|
315
317
|
index: `${tmp}/index.js`,
|
|
@@ -325,7 +327,10 @@ function adapter(userOpts = {}) {
|
|
|
325
327
|
}),
|
|
326
328
|
commonjs({ strictRequires: true }),
|
|
327
329
|
json()
|
|
328
|
-
]
|
|
330
|
+
],
|
|
331
|
+
onLog(level, log) {
|
|
332
|
+
builder.log[level === "debug" ? "minor" : level](log.message);
|
|
333
|
+
}
|
|
329
334
|
});
|
|
330
335
|
await bundle.write({
|
|
331
336
|
dir: `${out}/server`,
|
|
@@ -370,6 +375,9 @@ function adapter(userOpts = {}) {
|
|
|
370
375
|
}
|
|
371
376
|
delete pkg.devDependencies;
|
|
372
377
|
writeFileSync(`${out}/package.json`, JSON.stringify(pkg, null, 2) + "\n");
|
|
378
|
+
if (opts.exportPrerender) {
|
|
379
|
+
writeFileSync(`${out}/prerendered.json`, JSON.stringify(builder.prerendered, null, 2) + "\n");
|
|
380
|
+
}
|
|
373
381
|
builder.log.success(`Build done.`);
|
|
374
382
|
},
|
|
375
383
|
emulate() {
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED