I have been stuck for days on this issue too (I am new to the node.js/Meteor/React/JavaScript world). I found a solution using webpackJS.
My working solution (applied to a tiny application that should make it easy to understand; I only display a datagrid using hard-coded data) is available on my GitHub repository (commit 902c92c). The application is called "reactDataGrid", it is a subfolder of the repository, you just need to run "meteor" within that folder.
The two key steps in my case were:
- to create a .babelrc file with the content described here (and copied below). I believe this helps webpack parse the JSX syntax of react. I have a feeling this may be key to your issue as well, as it is reported as a
SyntaxError
.
.babelrc
{
"presets": [
[
"es2015",
{
"modules": false
}
],
"react"
]
}
- the
require('react-datagrid/index.css')
statement inside my main.jsx file, that tells webpack to include that CSS file in the dependency tree of my app. This is actually an instruction described in the README of the zippyui/react-datagrid GitHub repository. (Unfortunately stackoverflow limits to two links in my post, so I cannot link it here anymore)
I cannot guarantee that this is the preferred method of doing it, but I can say that it works for me. I hope it helps.
Best,
Kevin