Babel Plugins 101

Babel Plugins 101

Writing a Babel Plugin is simpler than you may think!


Giuseppe Gurgone

February 09, 2020


  1. 8.

    Pro-tip Use AST Explorer to find out the name of

    a piece of syntax! JSXAttribute ingredients JSXIdentifier {} JSXExpressionContainer [] ArrayExpression ‘pineapple’ StringLiteral
  2. 15.
  3. 16.

    Next? Replace a path and more Babel Handbook Create a

    node: Babel Types
  4. 17.

    Conclusion Babel is awesome! It is more than a tool

    for transpiling new syntax! Writing Babel plugins is empowering and my favorite (programming) hobby. True Test Drive Development: expect(transpiled).toEqual(expected); AST Explorer, Handbook and Babel Types Docs! Thank: @fkling42, James Kyle and the Babel contributors!