After upgrading relay-runtime and relay-compiler from 9.1.0 to 10.0.0 I started to get the following error from UglifyJs:
ERROR in bundle.js from UglifyJs
Unexpected token: operator 芦*禄, expected: punc 芦(禄 [./node_modules/relay-runtime/lib/store/RelayModernStore.js:639,0][bundle.js:56627,28]
Uglify is called from webpack config like so:
...
devtool: 'source-map',
plugins: [
new UglifyJSPlugin({
sourceMap: true
}),
...
Any ideas / workarounds?
The file in question has a generator function which is somewhat newer syntax (been around a while though). You'll likely have to change whatever JS parser you're using to handle more recent syntax.
This is also causing problems in IE-11, since IE-11 does not support generator functions.
I have to transpile relay-runtime to make it work.
Yup, you may have to transform the code to support outdated browsers.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Yup, you may have to transform the code to support outdated browsers.