Skip to content

Make the react-chatview transpiled module #10

@yloeza

Description

@yloeza

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions