@@ -14,14 +14,14 @@ const {
14
14
_getPresetEnv,
15
15
} = require ( "./babel-options-util" ) ;
16
16
17
- module . exports = function getBabelOptions ( config , appInstance ) {
18
- let { parent, project } = appInstance ;
17
+ module . exports = function getBabelOptions ( config , cliBabelInstance ) {
18
+ let { parent, project } = cliBabelInstance ;
19
19
let addonProvidedConfig = _getAddonProvidedConfig ( config ) ;
20
- let shouldIncludeHelpers = _shouldIncludeHelpers ( config , appInstance ) ;
20
+ let shouldIncludeHelpers = _shouldIncludeHelpers ( config , cliBabelInstance ) ;
21
21
let shouldHandleTypeScript = _shouldHandleTypeScript ( config , parent , project ) ;
22
22
let shouldIncludeDecoratorPlugins = _shouldIncludeDecoratorPlugins ( config ) ;
23
23
24
- let emberCLIBabelConfig = config [ "ember-cli-babel" ] ;
24
+ let emberCLIBabelConfig = config [ "ember-cli-babel" ] ;
25
25
let shouldRunPresetEnv = true ;
26
26
27
27
if ( emberCLIBabelConfig ) {
@@ -38,13 +38,16 @@ module.exports = function getBabelOptions(config, appInstance) {
38
38
}
39
39
40
40
if ( shouldIncludeDecoratorPlugins ) {
41
- userPlugins = _addDecoratorPlugins (
42
- userPlugins . slice ( ) ,
43
- addonProvidedConfig . options ,
41
+ userPlugins = _addDecoratorPlugins ( {
42
+ plugins : userPlugins . slice ( ) ,
43
+ options : addonProvidedConfig . options ,
44
44
config,
45
45
parent,
46
- project
47
- ) ;
46
+ project,
47
+ isClassPropertiesRequired : cliBabelInstance . isPluginRequired (
48
+ "proposal-class-properties"
49
+ ) ,
50
+ } ) ;
48
51
}
49
52
50
53
options . plugins = [ ]
@@ -56,7 +59,8 @@ module.exports = function getBabelOptions(config, appInstance) {
56
59
_getEmberDataPackagesPolyfill ( config , parent ) ,
57
60
_shouldCompileModules ( config , project ) && _getModulesPlugin ( ) ,
58
61
userPostTransformPlugins
59
- ) . filter ( Boolean ) ;
62
+ )
63
+ . filter ( Boolean ) ;
60
64
61
65
options . presets = [
62
66
shouldRunPresetEnv && _getPresetEnv ( addonProvidedConfig , project ) ,
0 commit comments