Skip to content

Commit

Permalink
feat: add decoratorsBeforeExport option
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Nov 27, 2018
1 parent f6ea6f9 commit bfb78a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/@vue/babel-preset-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = (context, options = {}) => {
exclude,
shippedProposals,
forceAllTransforms,
decoratorsBeforeExport,
decoratorsLegacy
} = options

Expand Down Expand Up @@ -131,7 +132,10 @@ module.exports = (context, options = {}) => {
// too many unstable proposals. Let's be conservative in the defaults here.
plugins.push(
require('@babel/plugin-syntax-dynamic-import'),
[require('@babel/plugin-proposal-decorators'), { legacy: decoratorsLegacy !== false }],
[require('@babel/plugin-proposal-decorators'), {
decoratorsBeforeExport,
legacy: decoratorsLegacy !== false
}],
[require('@babel/plugin-proposal-class-properties'), { loose }],
)

Expand Down

0 comments on commit bfb78a9

Please sign in to comment.