Closed make-github-pseudonymous-again closed 2 years ago
Yes, this is correct. Everything but the modern
output is ES5 while the exponentiation operator is ES2016.
If you'd like to alter the targets you can do so using a "browserslist"
entry in your package.json
:
{
"browserslist": [
"node >= 7"
]
}
If you're only after Node compat (which I'm guessing since you've listed Node version), then this config will work. This operator has been supported since Node v7 (source).
Edit: Forgot, --target node
will do this as well without need to alter the browserslist config.
Thanks @rschristian. Is there a way to fix this with --taget web
? I was only giving out node version because that's what I use to run microbundle.
Yep, certainly can! Just edit the browserslist:
// package.json
{
"browserslist": [
"last 5 years"
]
}
Should do the trick.
Closing this out as it's hopefully been answered. Let me know if you're still having issues and I can reopen.
Expected? It is broken on Node v17.9.0.