bun-dev-server 0.9.1 → 0.9.2

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1243,18 +1243,22 @@ var debouncedbuildAndNotify = import_debounce.default(async (importerMeta, final
1243
1243
  event
1244
1244
  };
1245
1245
  finalConfig.beforeBuild?.(buildEnv);
1246
- const output = await Bun.build(buildCfg);
1247
- publishOutputLogs(bunServer, output, event);
1248
- if (finalConfig.createDefaultIndexHTML) {
1249
- publishIndexHTML(destinationPath, finalConfig.serveOutputHtml, output, event);
1250
- }
1251
- if (finalConfig.writeManifest) {
1252
- writeManifest(output, destinationPath, finalConfig.manifestWithHash, finalConfig.manifestName);
1253
- }
1254
- finalConfig.afterBuild?.(output, buildEnv);
1255
- const tscSuccess = await performTSC(finalConfig, importerMeta);
1256
- if (finalConfig.reloadOnChange && tscSuccess) {
1257
- bunServer.publish("message", JSON.stringify({ type: "reload" }));
1246
+ try {
1247
+ const output = await Bun.build(buildCfg);
1248
+ publishOutputLogs(bunServer, output, event);
1249
+ if (finalConfig.createDefaultIndexHTML) {
1250
+ publishIndexHTML(destinationPath, finalConfig.serveOutputHtml, output, event);
1251
+ }
1252
+ if (finalConfig.writeManifest) {
1253
+ writeManifest(output, destinationPath, finalConfig.manifestWithHash, finalConfig.manifestName);
1254
+ }
1255
+ finalConfig.afterBuild?.(output, buildEnv);
1256
+ const tscSuccess = await performTSC(finalConfig, importerMeta);
1257
+ if (finalConfig.reloadOnChange && tscSuccess) {
1258
+ bunServer.publish("message", JSON.stringify({ type: "reload" }));
1259
+ }
1260
+ } catch (e) {
1261
+ console.error(e);
1258
1262
  }
1259
1263
  }, watchDelay, { immediate: true });
1260
1264
  function handleErrorResponse(req, err) {
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "exports": {
22
22
  ".": "./dist/index.js"
23
23
  },
24
- "version": "0.9.1",
24
+ "version": "0.9.2",
25
25
  "module": "index.ts",
26
26
  "type": "module",
27
27
  "license": "MIT",