pub struct JsxImportSourceRule {
pub source: String,
pub config_dir: PathBuf,
pub include: Vec<String>,
pub exclude: Vec<String>,
}Expand description
A JSX import source that a bundler or test config sets for a group of files.
With the automatic JSX runtime, the transform adds an import of
<source>/jsx-dev-runtime to each file with JSX, and no import statement
shows that edge. A per-file @jsxImportSource pragma overrides the config,
so the resolver applies a rule only to a module with
jsx_runtime_from_config set. Built from the config each run and never
cached with per-file extraction.
Fields§
§source: StringThe importSource value as written, for example ./src/jsx or
preact.
config_dir: PathBufAbsolute directory of the config file. The include globs match paths
relative to it, and a relative source that does not resolve from the
file resolves from it.
include: Vec<String>Glob patterns, relative to config_dir, of the files that the config
transforms.
exclude: Vec<String>Glob patterns, relative to config_dir, of the files that the config
does not transform, also when include matches them.
Trait Implementations§
Source§impl Clone for JsxImportSourceRule
impl Clone for JsxImportSourceRule
Source§impl Debug for JsxImportSourceRule
impl Debug for JsxImportSourceRule
impl Eq for JsxImportSourceRule
Source§impl PartialEq for JsxImportSourceRule
impl PartialEq for JsxImportSourceRule
impl StructuralPartialEq for JsxImportSourceRule
Auto Trait Implementations§
impl Freeze for JsxImportSourceRule
impl RefUnwindSafe for JsxImportSourceRule
impl Send for JsxImportSourceRule
impl Sync for JsxImportSourceRule
impl Unpin for JsxImportSourceRule
impl UnsafeUnpin for JsxImportSourceRule
impl UnwindSafe for JsxImportSourceRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.