floatdrop / plugin-jsx

JSX loader plugin
MIT License
36 stars 10 forks source link

breaks when trying to bundle #15

Open mgenev opened 8 years ago

mgenev commented 8 years ago

I run the command jspm bundle js/app.jsx! -i

and it breaks on the html inside the jsx like this:

err  MultipleErrors: js/collection-tile.jsx:9:7: Unexpected token <
     js/collection-tile.jsx:10:9: Unexpected token <
     js/collection-tile.jsx:10:31: Unexpected token '/model/'
     js/collection-tile.jsx:10:33: Unexpected token this
     js/collection-tile.jsx:10:46: Unexpected token }
     js/collection-tile.jsx:11:11: Unexpected token <
     js/collection-tile.jsx:11:20: Unexpected token this
     js/collection-tile.jsx:11:21: Unexpected token props
     js/collection-tile.jsx:11:32: Unexpected token }
     js/collection-tile.jsx:11:34: Expected '/' in regular expression literal
     js/collection-tile.jsx:12:25: Unexpected token this
     js/collection-tile.jsx:12:26: Unexpected token props
     js/collection-tile.jsx:12:41: Unexpected token }
     js/collection-tile.jsx:12:43: Unexpected token >
     js/collection-tile.jsx:13:10: Expected '/' in regular expression literal
     js/collection-tile.jsx:14:8: Expected '/' in regular expression literal
     js/collection-tile.jsx:15:3: Unexpected token }
     js/collection-tile.jsx:16:1: Unexpected token }
     js/collection-tile.jsx:17:1: Unexpected token End of File
     js/collection-tile.jsx:17:1: Unexpected token End of File
     js/collection-tile.jsx:17:1: Unexpected token End of File```
infinite-tape commented 8 years ago

I get this same problem calling jspm bundle app/module build/bundle.js --minify followed by Unexpected token errors in the component. My code hasn't changed, but I've upgraded jspm. Is there a new way to do this?

mgenev commented 8 years ago

I ended up solving this by removing this plugin and allowing babel to handle my jsx which it does out of the box, if you remove the blacklist for jsx in jspm/system.js