Skip to content

Commit

Permalink
Group static block with decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Sep 26, 2023
1 parent 0bb04c8 commit 6a7e3a9
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lib/ember-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,6 @@ function _getModuleResolutionPlugins(config) {
function _getProposalDecoratorsAndClassPlugins(config) {
if (!config.shouldIgnoreDecoratorAndClassPlugins) {
return [
["@babel/plugin-proposal-decorators", { legacy: true }],
["@babel/plugin-proposal-class-properties"],
];
}
}

/**
* Required for apps to use `@ember/template-compliation`
* for transforming templates from babel-plugin-ember-template-compilation
Expand All @@ -179,11 +173,11 @@ function _getProposalDecoratorsAndClassPlugins(config) {
* when using plugin-proposal-class-properties, which is required
* when using non-spec decorators.
*/
function _getPluginTransformClassStaticBlock() {
return [
"@babel/plugin-transform-class-static-block",
]

["@babel/plugin-proposal-decorators", { legacy: true }],
["@babel/plugin-proposal-class-properties"],
];
}
}

/**
Expand All @@ -205,7 +199,6 @@ function _getPluginTransformClassStaticBlock() {
module.exports = function (appRoot, config = {}) {
return []
.concat(
_getPluginTransformClassStaticBlock(),
_getProposalDecoratorsAndClassPlugins(config),
_getDebugMacroPlugins(appRoot),
_getEmberModulesAPIPolyfill(appRoot, config),
Expand Down

0 comments on commit 6a7e3a9

Please sign in to comment.