Skip to content

Commit 7860aff

Browse files
authored
Merge pull request #50 from ijlee2/add-warning-to-readme
Added installation instructions for FastBoot users
2 parents 2efedd0 + 1beb39a commit 7860aff

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,33 @@ Installation
1818
ember install ember-container-query
1919
```
2020

21+
<details>
22+
<summary>Use FastBoot? ⚠️</summary>
23+
24+
This addon uses nullish coalescing operator `??`. If you use [FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot) (with `Node < v14.0`) and only support [browsers that natively support `??`](https://v8.dev/features/nullish-coalescing#support), you will run into a build error:
25+
26+
```bash
27+
/var/folders/2z/93zyyhx13rs879qr8rzyxrb40000gn/T/broccoli-689520dxo26a682Mz/out-529-broccoli_merge_trees/assets/vendor.js:121232
28+
return this.args.features ?? {};
29+
^
30+
SyntaxError: Unexpected token '?'
31+
```
32+
33+
To prevent this, please make sure to add `node: 'current'` to your `config/targets.js` file.
34+
35+
```javascript
36+
'use strict';
37+
38+
const browsers = [ ... ];
39+
40+
module.exports = {
41+
browsers,
42+
node: 'current'
43+
};
44+
```
45+
46+
</details>
47+
2148

2249
Applications
2350
------------------------------------------------------------------------------

0 commit comments

Comments
 (0)