turbo
fb464458 - Replace MDX ModuleType with MDX SourceTransform (#8766)

Commit
1 year ago
Replace MDX ModuleType with MDX SourceTransform (#8766) ### Description Remove `ModuleType::Mdx` and instead handle mdx files using ```rust ModuleRuleEffect::ModuleType(ModuleType::Typescript { transforms: ts_app_transforms, tsx: true, analyze_types: enable_types, options: ecmascript_options_vc, }), ModuleRuleEffect::SourceTransforms(Vc::cell(vec![Vc::upcast( MdxTransform::new(mdx_transform_options), )])), ``` ### Testing Instructions I ran these Next.js tests, which appear to be all mdx related tests there are ``` mdx with-mdx-rs app directory ✓ should work in initial html (1262 ms) ✓ should work using browser (1460 ms) ✓ should work in initial html with mdx import (145 ms) ✓ should work using browser with mdx import (1179 ms) ✓ should allow overriding components (1163 ms) ✓ should allow importing client components (26 ms) ✓ should work with next/image (424 ms) pages directory ✓ should work in initial html (1091 ms) ✓ should work using browser (1216 ms) ✓ should work in initial html with mdx import (147 ms) ✓ should work using browser with mdx import (1202 ms) ✓ should allow overriding components (1236 ms) ```
Author
Parents
Loading