rolldown 0.1.0

Fast JavaScript bundler in Rust, designed for the future of Vite
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use rolldown_watcher::EventHandler;

use crate::dev::build_driver_service::{BuildChannelTx, BuildMessage};

pub struct WatcherEventHandler {
  pub service_tx: BuildChannelTx,
}
impl EventHandler for WatcherEventHandler {
  fn handle_event(&mut self, event: rolldown_watcher::FileChangeResult) {
    self.service_tx.send(BuildMessage::WatchEvent(event)).expect(
      "Build service channel closed while sending file change event - build service terminated unexpectedly"
    );
  }
}