storybookjs / marksy

📑 A markdown to custom VDOM components library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] jsx renderer is broken by babel's /*#__PURE__*/ comment

farcaller opened this issue · comments

Describe the bug

jsx renderer never renders any components anymore.

Steps to reproduce the behavior

Run the demo snippet from the readme using the jsx syntax.

Expected behavior

The element renders.

Additional context

Babel will return e.g. '/*#__PURE__*/\nReact.createElement(TestEl2, null, "children");' as a transpiled string (notice the /*#__PURE__*/, which will break the assumption that return will return the created element. THe inner function will return null instead.