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

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

Implementations on Foreign Types

Implementors