I've been struggling for a while now with a problem that I believe is caused by Webpack.
Essentially, I have a Node-based app that I'm bundling up with Webpack to serve to the client (it's a ReactJS based app). The problem occured when I installed the Tabletop NPM package and require
d it.
When attempting to load the Webpack-created bundle.js
in the browser, I get a syntax error:
Uncaught SyntaxError: Unexpected identifier
which is complaining about this line in bundle.js
:
target[capName] = __webpack_require__(387)(""path + '/' + name);
After some digging, I discover that this line originates from a line in the Hoek library (which is a sub-dependency of Tabletop):
target[capName] = require(path + '/' + name);
Clearly, Webpack has done something funky here.
I haven't been able to isolate the cause though. Tabletop includes an example of NodeJS usage which I was able to Webpack and run just fine.
I also cloned Hoek and Webpacke'd it without seeing any illegal transformations like the above.
So now, I'm not sure if this is a Webpack, Hoek, or Tabletop issue, that's why I'm posting it here.
I find no related issues, here or on GH.
All help appreciated!