[][src]Trait swc_bundler::Load

pub trait Load: Send + Sync {
    fn load(&self, file: &FileName) -> Result<(Lrc<SourceFile>, Module), Error>;
}

Responsible for providing files to the bundler.

Note: Resolve and Load are separate trait because multiple module can depend on a single module. Due to the possibility of 'common' module, bundler should implement some caching. The bundler uses FileName as a key of the cache.

This trait is designed to allow passing pre-parsed module.

Required methods

fn load(&self, file: &FileName) -> Result<(Lrc<SourceFile>, Module), Error>

Loading content...

Implementations on Foreign Types

impl<T: ?Sized + Load> Load for Box<T>[src]

impl<'a, T: ?Sized + Load> Load for &'a T[src]

Loading content...

Implementors

Loading content...