Skip to content

Commit

Permalink
improve: Improved @babel/plugin-proposal-decorators options, `decorat…
Browse files Browse the repository at this point in the history
…orsBeforeExport` is the officially right way now: tc39/proposal-decorators#69

Signed-off-by: Jaid <jaid.jsx@gmail.com>
  • Loading branch information
Jaid committed May 26, 2021
1 parent 1a570a5 commit a2331bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export default (api, options) => {
configBuilder.plugin("aot-loader/babel")
}
configBuilder.plugin("@babel/plugin-proposal-decorators", {
decoratorsBeforeExport: options.legacyDecorators ? undefined : true,
legacy: options.legacyDecorators ? true : undefined,
decoratorsBeforeExport: true, // This is the officially right way now: https://github.com/tc39/proposal-decorators/issues/69#issuecomment-455538637
legacy: options.legacyDecorators,
})
configBuilder.plugin("@babel/plugin-proposal-do-expressions")
configBuilder.plugin("@babel/plugin-proposal-pipeline-operator", {
Expand Down

0 comments on commit a2331bd

Please sign in to comment.