pugjs / babel-plugin-transform-react-pug

A plugin for transpiling pug templates to jsx
MIT License
810 stars 47 forks source link

Can't change "React.Fragment" output — Babel's transform react-jsx plugin doesn't honor the "pragmaFrag" option #120

Open audunolsen opened 4 years ago

audunolsen commented 4 years ago

I use Preact But my fragments always end up as React.Fragment regardless of what the pragmaFrag option says. Is babel-plugin-transform-react-pug to blame?

babel config:

plugins: [
  "transform-react-pug",
  "transform-jsx-classname-components",
  [ "@babel/plugin-transform-react-jsx", {
    pragma     : "Preact.h",
    pragmaFrag : "Preact.Fragment",
  }],
],