pugjs / babel-plugin-transform-react-pug

A plugin for transpiling pug templates to jsx
MIT License
808 stars 46 forks source link

any chance to use this plugin with coffee-loader? #104

Open yi opened 5 years ago

yi commented 5 years ago

hi, our react app is written in coffeescript. Would it be possible to use this plugin with coffee-loader?

I've tried installing this plugin as es-plugin to coffee-loader, but go following error:

Error: Got an unexpected exception from the coffeescript compiler. The original exception was: Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/ty/workspaces/tgb-h5client/node_modules/babel-preset-react/lib/index.js
(The coffeescript compiler should not raise *unexpected* exceptions. You can file this error as an issue of the coffeescript compiler: https://github.com/jashkenas/coffee-script/issues)
ezhlobo commented 5 years ago

@yi hey, thank you for this report.

Do you think you can provide a repository with this error inside? This will be very handy to debug because I'm not familiar with coffee-loader and your environment.