I am trying to get webpack and mapbox-gl work together within Meteor system. I have look everywhere about the error mentioned above but none works. Here is my webpack setup
I had a similar issue. Try this:
Identify which module is throwing the fs.readFileSync error. For me it was mime which is a dependency of url-loader.
I replaced it with file-loader which doesn't depend on mime, and hence not the fs. Ensure to uninstall url-loader as it will still throw the error!
Then update your webpack.conf with:
{
test: /\.(ttf|eot|svg|jpg|gif|png|woff|woff2)$/,
loader: 'file-loader'
}
Hope that helps!