jridgewell / babel-plugin-transform-incremental-dom

Turn JSX into IncrementalDOM
MIT License
145 stars 12 forks source link

elementOpen is not defined #92

Closed jimsimon closed 7 years ago

jimsimon commented 7 years ago

I'm getting Uncaught ReferenceError: elementOpen is not defined

I'm running into issues with the attached webpack + babel project. It looks like elementOpen is in the output, just not in scope for some reason.

To see the error happen, just run your favorite http server on the dist directory and load up index.html. You can run the webpack build with npm run build if you'd like.

Archive.zip

jridgewell commented 7 years ago

You're not importing (or auto-importing) in the my-test.js file.

jimsimon commented 7 years ago

Oh wow, how did I miss that! I swear I looked for something like it too. Thanks!

As a side note, this is a somewhat unexpected behavior in my mind since I expect to be able to write JSX and just have it work out of the box (with the plugin). It might be worth enabling auto-import by default in a future major release.

Thanks again!