Closed jwcooper closed 3 months ago
It looks like esbuild
reported an error. You may refer to this link. https://github.com/evanw/esbuild/issues/732
Yeah I think this is expected. It's not possible to downlevel BigInt to be used in older browsers that don't support it. However, if you want to get the build passing you can configure this:
esbuild: {
supported: {
bigint: true
}
}
So that esbuild will assume that bigint will be supported. However your site will not work when it runs the file that contains the BigInt syntax.
Describe the bug
Using defaults, vite plugin legacy errors out on a statement such as
console.log(123n)
console.log(BigInt(123))
works just fine.Reproduction
https://github.com/jwcooper/vite-bigint
Steps to reproduce
Run
npm install
followed bynpm run build
System Info
Used Package Manager
npm
Logs
Validations