Open zbyte64 opened 8 years ago
Thanks for the report!
The problem actually lies in the fork (of a fork) of escodegen that jsxlate relies on. That project is here: https://github.com/drd/escodegen/tree/wallaby and it is a matter of it missing a code generator for ExportNamedDeclaration … it looks like you have a different kind of export statement than is currently supported. It appears that estools/escodgen
now supports these statements, so it should be fairly easy to fix.
I would certainly welcome a PR against my fork of escodegen, but if not I'll see when I can get around to it. I'm also in the process of a (compatible) rewrite of jsxlate which will not depend on escodgen in this way.
In the meantime, if you are able to re-structure your export statements then jsxlate would work as-is. I'd be happy to help with that if you show me the offending export in ./src/experiments/admin/application.jsx
.
My exports look like:
export var Root = React.createClass({
...
})
Ok, so if you change that to:
var Root = React.createClass({
...
})
export Root;
That should change it to the non-offending ExportDeclaration
statement type and work.
When I add jsxlate to my webpack loaders I get the following stack trace:
Here is my webpack config: