INNER CODE UNIT · JavaScript

BabelOrderPlugin

standard-things/esm · .babel.config.js:90

function BabelOrderPlugin(plugins) {
  return {
    visitor: {
      Program(path) {
        for (const plugin of plugins) {
          path.traverse(plugin(babel).visitor)
        }
      }
    }
  }
}

function BabelRemoveSloppyPlugin() {
  function enterFunction({ node: { body: directives } }) {
    arrayRemove(directives, ({ value: { value } }) => value === "use sloppy")
  }

  return {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…