File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ module.exports = {
29
29
use : {
30
30
loader : 'babel-loader-8' ,
31
31
options : {
32
+ plugins : [
33
+ // Transpile new syntax, which is apparently not yet handled by
34
+ // `@babel/preset-env`.
35
+ // @see https://github.com/typed-ember/ember-cli-typescript/blob/b2e75abc98beefe635b6cfd8808c887813acb44e/ts/addon.ts#L89-L94
36
+ require . resolve ( '@babel/plugin-proposal-optional-chaining' ) ,
37
+ require . resolve (
38
+ '@babel/plugin-proposal-nullish-coalescing-operator'
39
+ )
40
+ ] ,
32
41
presets : [
33
42
// Transpile TypeScript
34
43
require . resolve ( '@babel/preset-typescript' ) ,
Original file line number Diff line number Diff line change 16
16
"lint:js" : " eslint --ext ts,js ."
17
17
},
18
18
"dependencies" : {
19
+ "@babel/plugin-proposal-nullish-coalescing-operator" : " ^7.8.3" ,
20
+ "@babel/plugin-proposal-optional-chaining" : " ^7.8.3" ,
19
21
"@babel/preset-env" : " ^7.8.4" ,
20
22
"@babel/preset-typescript" : " ^7.8.3"
21
23
},
Original file line number Diff line number Diff line change 1
- export const works = ( ) => true ;
1
+ const foo = { bar : { baz : undefined } } ;
2
+
3
+ export const works = foo . bar ?. baz ?? ( ( ) => true ) ;
You can’t perform that action at this time.
0 commit comments