Skip to content

Commit

Permalink
feat: watch .wasm imports when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 29, 2023
1 parent 7446cbf commit ea9343f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ const unplugin = createUnplugin<UnwasmPluginOptions>((opts) => {
return;
}

this.addWatchFile(id);

const buff = await fs.readFile(id);
return buff.toString('binary');
},
Expand Down

0 comments on commit ea9343f

Please sign in to comment.