rolldown / Builtin Plugins

https://github.com/rolldown/rolldown

rolldown_plugin_transform

  1. figure out what type of source using ocx::oxc_span::source_type
  2. parse the source code with rolldown_ecmascript::EcmaCompiler
  3. keep track of the comments (extracted by the parser)
  4. Extract symbols and scopes using oxc::oxc_semantic::SemanticBuilder
  5. Pass the ast oxc::oxc_codegen::CodeGenerator that will generate code + sourcemap

📄