Skip to content

Commit

Permalink
chore: extends overrides_ingore_list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinbao1001 committed Jul 12, 2024
1 parent bf896b3 commit b2c391f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
19 changes: 9 additions & 10 deletions crates/mako/src/dev/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,18 @@ impl<'a> Watcher<'a> {
}

fn get_ignore_list(&self, ignore_list_args: IgnoreListArgs) -> Vec<PathBuf> {
let mut ignore_list: Vec<&str> = vec![".git", "node_modules", ".DS_Store", ".node"];
let mut ignore_list: Vec<&str> = vec![".git", ".DS_Store", ".node"];
let overrides_ignore_list = vec!["node_modules"];
if ignore_list_args.with_output_dir {
ignore_list.push(self.compiler.context.config.output.path.to_str().unwrap());
}
ignore_list.extend(
self.compiler
.context
.config
.watch
.ignore_paths
.iter()
.map(|p: &String| p.as_str()),
);
let config_ignore_path = &self.compiler.context.config.watch.ignore_paths;
if config_ignore_path.is_empty() {
ignore_list.extend(overrides_ignore_list);
} else {
ignore_list.extend(config_ignore_path.iter().map(|p: &String| p.as_str()));
}

if ignore_list_args.with_node_modules {
ignore_list.retain(|&item| item != "node_modules");
return ignore_list.into_iter().map(PathBuf::from).collect();
Expand Down
4 changes: 0 additions & 4 deletions packages/mako/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

/* auto-generated by NAPI-RS */

export interface TransformOutput {
code: string;
map?: string;
}
export interface JsHooks {
name?: string;
load?: (
Expand Down

0 comments on commit b2c391f

Please sign in to comment.