New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement transform support for using
declarations
#15633
Changes from 1 commit
75fc5e1
412683d
cfe39ca
21d34ed
abea92e
5915cab
e557bb5
9ae33e1
4273acc
534ca92
f31b2f2
4b6937c
2b15c2f
0fb55e5
973cf10
f558fe7
84a4856
25b50a1
b210dcf
2dfaf23
dd6df92
853d6af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import _Symbol from "@babel/runtime-corejs2/core-js/symbol"; | ||
import _Symbol$iterator from "@babel/runtime-corejs2/core-js/symbol/iterator"; | ||
import _Array$from from "@babel/runtime-corejs2/core-js/array/from"; | ||
import _Symbol from "core-js/library/fn/symbol.js"; | ||
import _Symbol$iterator from "core-js/library/fn/symbol/iterator.js"; | ||
import _Array$from from "core-js/library/fn/array/from.js"; | ||
export default function _iterableToArray(iter) { | ||
if (typeof _Symbol !== "undefined" && iter[_Symbol$iterator] != null || iter["@@iterator"] != null) return _Array$from(iter); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
var _Object$create = require("@babel/runtime-corejs3/core-js/object/create"); | ||
var _Promise = require("@babel/runtime-corejs3/core-js/promise"); | ||
var _SuppressedError = require("core-js-pure/features/suppressed-error.js"); | ||
var _Object$create = require("core-js-pure/features/object/create.js"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now this is polyfilled :) |
||
var _Promise = require("core-js-pure/features/promise/index.js"); | ||
function dispose_SuppressedError(suppressed, error) { | ||
return dispose_SuppressedError = function dispose_SuppressedError(suppressed, error) { | ||
return "undefined" != typeof _SuppressedError ? dispose_SuppressedError = _SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(suppressed, error) { | ||
this.suppressed = suppressed, this.error = error, this.stack = new Error().stack; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible we're doing dead code elimination here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We minify helpers before injecting polyfills and not after, however any users bundling our helpers in a client-side bundle will usually re-minify them (all bundlers minify the end bundle, and not just the individual chunks) and this will be very easily eliminated :) |
||
}, dispose_SuppressedError.prototype = _Object$create(Error.prototype, { | ||
constructor: { | ||
value: dispose_SuppressedError, | ||
writable: !0, | ||
configurable: !0 | ||
} | ||
}), new dispose_SuppressedError(suppressed, error); | ||
})), new dispose_SuppressedError(suppressed, error); | ||
} | ||
function _dispose(stack, error, hasError, SuppressedError) { | ||
function _dispose(stack, error, hasError) { | ||
function next() { | ||
if (0 !== stack.length) { | ||
var r = stack.pop(); | ||
|
@@ -26,7 +27,7 @@ function _dispose(stack, error, hasError, SuppressedError) { | |
if (hasError) throw error; | ||
} | ||
function err(e) { | ||
return error = hasError ? new (SuppressedError || dispose_SuppressedError)(e, error) : e, hasError = !0, next(); | ||
return error = hasError ? new dispose_SuppressedError(e, error) : e, hasError = !0, next(); | ||
} | ||
return next(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a side effect of using
babel-plugin-polyfill-corejs2
directly, but it's good: there is one less "proxy file" that does nothing other than re-exporting another file.