Closed soda0289 closed 7 years ago
👍 Can you please submit a PR so that it would go into the next major release?
Sure, will work on this tomorrow
It was pretty simple change I just used the same code for the literal nodes in acorn. https://github.com/RReverser/acorn-jsx/pull/74
Published a new major version.
The Facebook JSX AST spec has recently changed. They now use
JSXText
nodes instead ofLiteral
nodes to store strings inside ofJSXElement
nodes. https://github.com/facebook/jsx/blob/master/AST.md#jsx-textThis would be a breaking change, if
Literal
was changed toJSXText
, but would allow this plugin to generate an AST that is more consistent with Babylon, Flow and ESPrima.@RReverser Is this something that you would consider changing?