bun-dev-server 0.9.8 → 0.9.81
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 +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1294,10 +1294,14 @@ function publishOutputLogs(bunServer, output, config, event) {
|
|
|
1294
1294
|
bunServer.publish("message", JSON.stringify({ type: "message", message: `[Bun HMR] ${event.filename} ${event.eventType}` }));
|
|
1295
1295
|
const outTable = output.outputs.filter((o) => o.kind !== "sourcemap").map((o) => {
|
|
1296
1296
|
const a = Bun.pathToFileURL(o.path);
|
|
1297
|
+
const distPath = Bun.pathToFileURL(config.buildConfig.outdir ?? "./dist");
|
|
1298
|
+
const distPathHref = distPath.href;
|
|
1299
|
+
const lastDistIdx = distPathHref.lastIndexOf("/") + 1;
|
|
1297
1300
|
const fileName = a.href.substring(a.href.lastIndexOf("/") + 1);
|
|
1301
|
+
const fileWithPath = a.href.substring(lastDistIdx);
|
|
1298
1302
|
return {
|
|
1299
1303
|
name: fileName,
|
|
1300
|
-
path:
|
|
1304
|
+
path: fileWithPath,
|
|
1301
1305
|
size: convertBytes(o.size)
|
|
1302
1306
|
};
|
|
1303
1307
|
});
|