pmndrs / detect-gpu

Classifies GPUs based on their 3D rendering benchmark score allowing the developer to provide sensible default settings for graphically intensive applications.
MIT License
1.04k stars 57 forks source link

fix: bump build target, correctly downlevel transpile #96

Open CodyJasonBennett opened 2 years ago

CodyJasonBennett commented 2 years ago

Fixes #89 and #86, following up #94, where things aren't being transpiled correctly.

According to https://esbuild.github.io/api/#target:

If you use a syntax feature that esbuild doesn't yet have support for transforming to your current language target, esbuild will generate an error where the unsupported syntax is used. This is often the case when targeting the es5 language version, for example, since esbuild only supports transforming most newer JavaScript syntax features to es6.

Also see https://esbuild.github.io/content-types/#javascript as for JS features by version.