Skip to content

Commit bfb78a9

Browse files
committed
feat: add decoratorsBeforeExport option
fixes #2974
1 parent f6ea6f9 commit bfb78a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/@vue/babel-preset-app/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module.exports = (context, options = {}) => {
5252
exclude,
5353
shippedProposals,
5454
forceAllTransforms,
55+
decoratorsBeforeExport,
5556
decoratorsLegacy
5657
} = options
5758

@@ -131,7 +132,10 @@ module.exports = (context, options = {}) => {
131132
// too many unstable proposals. Let's be conservative in the defaults here.
132133
plugins.push(
133134
require('@babel/plugin-syntax-dynamic-import'),
134-
[require('@babel/plugin-proposal-decorators'), { legacy: decoratorsLegacy !== false }],
135+
[require('@babel/plugin-proposal-decorators'), {
136+
decoratorsBeforeExport,
137+
legacy: decoratorsLegacy !== false
138+
}],
135139
[require('@babel/plugin-proposal-class-properties'), { loose }],
136140
)
137141

0 commit comments

Comments
 (0)