fix #626: "import.meta" is supported in node 10.4+

This commit is contained in:
Evan Wallace
2020-12-28 19:38:22 -08:00
parent 150a01844d
commit ef61169d00
3 changed files with 8 additions and 1 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## Unreleased
* Mark `import.meta` as supported in node 10.4+ ([#626](https://github.com/evanw/esbuild/issues/626))
It was previously marked as unsupported due to a typo in esbuild's compatibility table, which meant esbuild generated a shim for `import.meta` even when it's not necessary. It should now be marked as supported in node 10.4 and above so the shim will no longer be included when using a sufficiently new target environment such as `--target=node10.4`.
## 0.8.26
* Ensure the current working directory remains unique per `startService()` call

View File

@@ -238,6 +238,7 @@ var jsTable = map[JSFeature]map[Engine][]int{
ES: {2020},
Firefox: {62},
IOS: {12},
Node: {10, 4},
Safari: {11, 1},
},
Let: {

View File

@@ -151,7 +151,7 @@ mergeVersions('ImportMeta', {
es2020: true,
firefox62: true,
ios12: true,
node10_4: false, // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta
node10_4: true, // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta
safari11_1: true,
})