mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(linter): only resolve esm files for import plugin (#7720)
closes #7696 cjs files do not work at all.
This commit is contained in:
parent
5e6053f35a
commit
ad27b20dc3
2 changed files with 6 additions and 1 deletions
|
|
@ -156,6 +156,10 @@ impl Rule for Namespace {
|
|||
}
|
||||
};
|
||||
|
||||
if !module.has_module_syntax {
|
||||
return;
|
||||
}
|
||||
|
||||
let Some(symbol_id) = ctx.scopes().get_root_binding(entry.local_name.name()) else {
|
||||
return;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ impl Runtime {
|
|||
});
|
||||
Resolver::new(ResolveOptions {
|
||||
extensions: VALID_EXTENSIONS.iter().map(|ext| format!(".{ext}")).collect(),
|
||||
condition_names: vec!["module".into(), "require".into()],
|
||||
main_fields: vec!["module".into(), "main".into()],
|
||||
condition_names: vec!["module".into(), "import".into()],
|
||||
extension_alias,
|
||||
tsconfig,
|
||||
..ResolveOptions::default()
|
||||
|
|
|
|||
Loading…
Reference in a new issue