@meteorjs/babel 7.18.0-beta.2 → 7.18.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/options.js +10 -8
- package/package.json +1 -1
- package/plugins/async-await.js +1 -1
package/options.js
CHANGED
|
@@ -185,14 +185,16 @@ function getDefaultsForNode8(features) {
|
|
|
185
185
|
|
|
186
186
|
// Ensure that async functions run in a Fiber, while also taking
|
|
187
187
|
// full advantage of native async/await support in Node 8.
|
|
188
|
-
const isFiberDisabled = process.env.DISABLE_FIBERS
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
const isFiberDisabled = process.env.DISABLE_FIBERS === '1';
|
|
189
|
+
const ignoreAsyncPlugin = process.env.IGNORE_ASYNC_PLUGIN === '1';
|
|
190
|
+
|
|
191
|
+
if (!ignoreAsyncPlugin) {
|
|
192
|
+
combined.plugins.push([require("./plugins/async-await.js"), {
|
|
193
|
+
// Do not transform `await x` to `Promise.await(x)`, since Node
|
|
194
|
+
// 8 has native support for await expressions.
|
|
195
|
+
useNativeAsyncAwait: isFiberDisabled,
|
|
196
|
+
}]);
|
|
197
|
+
}
|
|
196
198
|
// Enable async generator functions proposal.
|
|
197
199
|
combined.plugins.push(require("@babel/plugin-proposal-async-generator-functions"));
|
|
198
200
|
}
|
package/package.json
CHANGED