Skip to content

Commit

Permalink
Merge 345214d into df97e13
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell authored Aug 11, 2023
2 parents df97e13 + 345214d commit 82c2e3a
Show file tree
Hide file tree
Showing 21 changed files with 416 additions and 87 deletions.
3 changes: 2 additions & 1 deletion crates/turbopack-ecmascript/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ async fn gen_content_with_visitors(
source_map,
globals,
eval_context,
comments,
..
} = &*parsed
{
Expand Down Expand Up @@ -650,7 +651,7 @@ async fn gen_content_with_visitors(
..Default::default()
},
cm: source_map.clone(),
comments: None,
comments: Some(&comments),
wr: JsWriter::new(source_map.clone(), "\n", &mut bytes, Some(&mut srcmap)),
};

Expand Down
1 change: 1 addition & 0 deletions crates/turbopack-ecmascript/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ async fn parse_content(
source_map: &source_map,
top_level_mark,
unresolved_mark,
swc_file_name: &file_name,
file_path_str: &fs_path.path,
file_name_str: fs_path.file_name(),
file_name_hash: file_path_hash,
Expand Down
3 changes: 2 additions & 1 deletion crates/turbopack-ecmascript/src/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use anyhow::Result;
use async_trait::async_trait;
use swc_core::{
base::SwcComments,
common::{chain, comments::Comments, util::take::Take, Mark, SourceMap},
common::{chain, comments::Comments, util::take::Take, FileName, Mark, SourceMap},
ecma::{
ast::{Module, ModuleItem, Program, Script},
preset_env::{
Expand Down Expand Up @@ -123,6 +123,7 @@ pub struct TransformContext<'a> {
pub file_name_str: &'a str,
pub file_name_hash: u128,
pub file_path: Vc<FileSystemPath>,
pub swc_file_name: &'a FileName,
}

impl EcmascriptInputTransform {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 82c2e3a

Please sign in to comment.