Neutrinojs react component unexpected token with <></>


February 2019


24 time


I'm creating an internal custom React component using Neutrinojs React component preset. So far I've managed to setup and build it. But somewhere in my component code I'm using this:

  <p>Hello Custom Component</p>

and when I try to start the development mode, it won't run because of that <></> syntax. If I manually change that wrapper to a div, it works as usual but in some specific cases, I prefer using a <></> because that would be more suitable.

Is there anywhere in Neutrino js config I can do to make it work with this kind of syntax in React 16?


So far this is my dev dependencies from package.json:

"devDependencies": {
    "@neutrinojs/jest": "^8.3.0",
    "@neutrinojs/react-components": "^8.3.0",
    "neutrino": "^8.3.0",
    "prop-types": "^15.7.1",
    "react": "^16.8.1",
    "react-dom": "^16.8.1",
    "@neutrinojs/style-loader": "^8.3.0",
    "node-sass": "^4.11.0",
    "sass-loader": "^7.1.0"

0 answers