-
Notifications
You must be signed in to change notification settings - Fork 41
Make the react-chatview transpiled module #10
Description
Currently the react-chatview is been published as a jsx code, with this approach when you try to import it into your project you need to explicity configure babel to compile it. For instance, if you are using webpack you need to include { test: /node_modules\/react-chatview/, loader: 'babel' } to workaround it.
I'm currently using mocha to run my tests, you can configure mocha to run babel compiler with mocha -R spec --recursive --compilers js:babel/register ... unfortunately, mocha does not provide a way to set more deep configurations on babel/register (i.e. using a regex on the ignore option to whitelist react-chatview from node_module files)
all this headaches could be solved if react-chatview publish the transpied version to npm, the current dist/react-chatview can't be used as you use react-chatview.js since it looks like is coupled to webpack