plouc / mozaik

Mozaïk is a tool based on nodejs / react / redux / nivo / d3 to easily craft beautiful dashboards
http://mozaik.rocks
MIT License
3.61k stars 363 forks source link

build failed when jsx syntax added #172

Closed ghost closed 5 years ago

ghost commented 5 years ago

I tried to add minio extention to the mozaik by running yarn add mozaik-ext-minio I see the following error.

Module parse failed: /Users/xyz/Desktop/m2/mozaik-demo/node_modules/mozaik-ext-minio/src/components/Bucket.js Unexpected token (16:12)
You may need an appropriate loader to handle this file type.
 return (
            <div>
                 <div className="widget__header">
                     <span>

I observed this issue even in my custom extension. Ex: React.createElement("div",null,"Hello world") is working fine but when i change to <div> Hello world </div> is not working.

ghost commented 5 years ago

I have given wrong entry for "module". once i changed to "module": "es/components/index.js",. it started working.