Add "decoratorsBeforeExport" to the babel-standalone presets (#8649)
This commit is contained in:
@@ -7,6 +7,7 @@ export default (_, opts = {}) => {
|
||||
loose = false,
|
||||
useBuiltIns = false,
|
||||
decoratorsLegacy = false,
|
||||
decoratorsBeforeExport,
|
||||
pipelineProposal = "minimal",
|
||||
} = opts;
|
||||
|
||||
@@ -14,7 +15,13 @@ export default (_, opts = {}) => {
|
||||
presets: [
|
||||
[
|
||||
presetStage1,
|
||||
{ loose, useBuiltIns, decoratorsLegacy, pipelineProposal },
|
||||
{
|
||||
loose,
|
||||
useBuiltIns,
|
||||
decoratorsLegacy,
|
||||
decoratorsBeforeExport,
|
||||
pipelineProposal,
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [transformFunctionBind],
|
||||
|
||||
@@ -12,11 +12,17 @@ export default (_, opts = {}) => {
|
||||
loose = false,
|
||||
useBuiltIns = false,
|
||||
decoratorsLegacy = false,
|
||||
decoratorsBeforeExport,
|
||||
pipelineProposal = "minimal",
|
||||
} = opts;
|
||||
|
||||
return {
|
||||
presets: [[presetStage2, { loose, useBuiltIns, decoratorsLegacy }]],
|
||||
presets: [
|
||||
[
|
||||
presetStage2,
|
||||
{ loose, useBuiltIns, decoratorsLegacy, decoratorsBeforeExport },
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
transformExportDefaultFrom,
|
||||
transformLogicalAssignmentOperators,
|
||||
|
||||
@@ -7,12 +7,20 @@ import transformNumericSeparator from "@babel/plugin-proposal-numeric-separator"
|
||||
import transformThrowExpressions from "@babel/plugin-proposal-throw-expressions";
|
||||
|
||||
export default (_, opts = {}) => {
|
||||
const { loose = false, useBuiltIns = false, decoratorsLegacy = false } = opts;
|
||||
const {
|
||||
loose = false,
|
||||
useBuiltIns = false,
|
||||
decoratorsLegacy = false,
|
||||
decoratorsBeforeExport,
|
||||
} = opts;
|
||||
|
||||
return {
|
||||
presets: [[presetStage3, { loose, useBuiltIns }]],
|
||||
plugins: [
|
||||
[transformDecorators, { legacy: decoratorsLegacy }],
|
||||
[
|
||||
transformDecorators,
|
||||
{ legacy: decoratorsLegacy, decoratorsBeforeExport },
|
||||
],
|
||||
transformFunctionSent,
|
||||
transformExportNamespaceFrom,
|
||||
transformNumericSeparator,
|
||||
|
||||
Reference in New Issue
Block a user