[][src]Function swc_ecma_transforms::optimization::simplify::inlining::inlining

pub fn inlining(_: Config) -> impl RepeatedJsPass + 'static

Note: this pass assumes that resolver is invoked before the pass.

As swc focuses on reducing gzipped file size, all strings are inlined.

TODOs

  • Handling of void 0
  • Properly handle binary expressions.
  • Track variables access by a function

Currently all functions are treated as a black box, and all the pass gives up inlining variables across a function call or a constructor call.