bluewings / pug-as-jsx-loader

MIT License
188 stars 15 forks source link

possible to use boolean shorthand? #48

Closed FicoPrieto closed 4 years ago

FicoPrieto commented 4 years ago

I tried using the boolean shorthand as referenced in the Pug and React documentation, but it doesn't seem to work.

For example: react-router's exact boolean property only works if I explicitly set it to {true}.

Boolean Is Not Applied

BrowserRouter
  Nav
  Route(path="/"        component="{Home   }" exact) // 🡸
  Route(path="/about"   component="{About  }"      )
  Route(path="/contact" component="{Contact}"      )

Boolean Is Applied

BrowserRouter
  Nav
  Route(path="/"        component="{Home   }" exact="{true}") // 🡸
  Route(path="/about"   component="{About  }"               )
  Route(path="/contact" component="{Contact}"               )
bluewings commented 4 years ago

@FicoPrieto I just modified it. Update the module to 1.0.85 to use 'boolean shorthand'.

FicoPrieto commented 4 years ago

Awesome, thanks!