@babel/plugin-proposal-record-and-tuple
{
"plugins": ["@babel/plugin-proposal-record-and-tuple"]
}
require("@babel/core").transformSync("code", {
plugins: [["@babel/plugin-proposal-record-and-tuple"]],
});
By default this plugin only transforms the proposal syntax, using the Record
and Tuple
globals:
{
[
"@babel/plugin-proposal-record-and-tuple",
{
}
]
]
Don’t forget to add @bloomberg/record-tuple-polyfill
to your dependencies!
If you wish to inject imports to a polyfill different from @bloomberg/record-tuple-polyfill
, you can use this option to specify its name.