pugjs / babel-plugin-transform-react-pug

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

We can't define variable and use it #73

Closed ezhlobo closed 5 years ago

ezhlobo commented 5 years ago

For example the following code will throw an error:

pug`
  - const i = 0
  h2= i
`

See live example: https://codesandbox.io/s/j34wv68wyy

ezhlobo commented 5 years ago

Sorry for the confusion, live example doesn't reflect the real transformation