Copping this error when I go to deploy/build for production.
I believe it’s an underlying problem with Webpack and Uglify, but just wondering if somebody here has faced a similar issue as I’ve spent many hours on SO and other forums and yet to find a solution.
Unexpected token: operator (>) [scripts/main_08ee6cfa.js:40288,22]
Removing the excludes from the jsx loader in WebPack seems to be working.
// exclude: [/(node_modules|bower_components)(?![/|\\](bootstrap|foundation-sites))/],
Any vendor library you install via npm/yarn doesn’t get transpiled through babel.
You can either force that when importing that library by prepending the babel loader such as
import 'babel!library-name' or change the
exclude condition in the
webpack.config like you did, but it’s not an error in sage. It’s just telling you you’re import an ES5+ library.