rapscallion
rapscallion copied to clipboard
babel-plugin-server: spread attributes
babel-plugin-server
throws an error on spread attributes.
A minimum test case:
$ echo '<Foo {...props} />;' | ./node_modules/.bin/babel --plugins ./src/transform/server
TypeError: unknown: Cannot read property 'name' of undefined
at objExpr.properties.forEach.property (/Users/shuhei/work/js/rapscallion/src/transform/server.js:198:21)
at Array.forEach (native)
at objectExpressionToObject (/Users/shuhei/work/js/rapscallion/src/transform/server.js:197:22)
at PluginPass.exit (/Users/shuhei/work/js/rapscallion/src/transform/server.js:27:21)
at newFn (/Users/shuhei/work/js/rapscallion/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/Users/shuhei/work/js/rapscallion/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/shuhei/work/js/rapscallion/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/shuhei/work/js/rapscallion/node_modules/babel-traverse/lib/path/context.js:117:8)
at TraversalContext.visitQueue (/Users/shuhei/work/js/rapscallion/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/Users/shuhei/work/js/rapscallion/node_modules/babel-traverse/lib/context.js:108:19)
would be cool to have this feature working (having the same behavior)
Alright, this is next in my queue.
Any news on this ?