firstname.lastname@example.org no longer targets ES5, and instead it targets Node.js v6 or greater. Moving forward, new major versions of json5 will target the oldest LTS version of Node.js at the time of publishing.
If you're using Node.js v6+, then you probably shouldn't be using rollup-plugin-uglify (or uglify-js) since it doesn't support ES6+. I recommend switching from rollup-plugin-uglify to rollup-plugin-terser, which does support ES6+. If you're using Node.js v5 or lower, then you should stick with email@example.com.
Alternatively, if you want to use json5@2 and rollup-plugin-uglify, you can use the bundle at dist/index.js, which still targets ES5 and works in browser and Node.js environments.
Oh, sorry. You're right. The bundle at dist/index.js is just bundled with rollup. The bundle at dist/index.min.js is bundled with rollup-plugin-terser, so it should work be ES5. I'll fix this in 2.0.1.
rollup --config rollup.config.js
It seems uglify-js is able to transpile only es5 syntax, and I'm using json5 in browser environment and target es5.
I'm not sure this is json5's bug(for example if json5 does not target es5 anymore, it is not a bug), feel free to close if not.
The text was updated successfully, but these errors were encountered: