Skip to content

Commit

Permalink
Comment on Vite's watchChange bug
Browse files Browse the repository at this point in the history
Vite's docs does not state `watchChange` so it's better to avoid the
hook entirely though.
  • Loading branch information
pocka committed Nov 27, 2024
1 parent 2c889fe commit 562838a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export function gleam({

gleamToml = parsed;
},
// FIXME: While Vite does trigger `watchChange`, it does not implement it correctly.
// As a result, compile error crashes the process, which differs from what Rollup does.
async watchChange(id, _change) {
// Whenever indirectly imported .gleam file is changed, build the whole project.
// Gleam compiler does the incremental compilation (we don't have a way to partially compile.)
Expand Down

0 comments on commit 562838a

Please sign in to comment.