From 6743383d2e89939ae9c12d8de027f05ae4d37518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 8 Nov 2020 23:27:36 +0100 Subject: upgrade: deno_doc, deno_lint, dprint, swc (#8292) --- cli/module_graph.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'cli/module_graph.rs') diff --git a/cli/module_graph.rs b/cli/module_graph.rs index 08f6c5f32..9f2689fd6 100644 --- a/cli/module_graph.rs +++ b/cli/module_graph.rs @@ -145,8 +145,7 @@ impl swc_bundler::Load for BundleLoader<'_> { fn load( &self, file: &swc_common::FileName, - ) -> Result<(Rc, swc_ecmascript::ast::Module), AnyError> - { + ) -> Result { match file { swc_common::FileName::Custom(filename) => { let specifier = ModuleSpecifier::resolve_url_or_path(filename) @@ -156,14 +155,19 @@ impl swc_bundler::Load for BundleLoader<'_> { .graph .get_media_type(&specifier) .context("Looking up media type during bundling.")?; - transpile_module( + let (source_file, module) = transpile_module( filename, &src, &media_type, self.emit_options, self.globals, self.cm.clone(), - ) + )?; + Ok(swc_bundler::ModuleData { + fm: source_file, + module, + helpers: Default::default(), + }) } else { Err( GraphError::MissingDependency(specifier, "".to_string()) -- cgit v1.2.3