Skip to content

Commit c8b0350

Browse files
committed
Added installation instructions for FastBoot users
1 parent 2efedd0 commit c8b0350

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

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

21+
<details>
22+
<summary>Use FastBoot? ⚠️</summary>
23+
24+
This addon uses nullish coalescing operator `??`. When you use [FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot) and only support [browsers that natively support `??`](https://v8.dev/features/nullish-coalescing#support), you may 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+
31+
SyntaxError: Unexpected token '?'
32+
```
33+
34+
Please make sure to add `node: 'current'` to your `config/targets.js` file.
35+
36+
```javascript
37+
'use strict';
38+
39+
const browsers = [ ... ];
40+
41+
module.exports = {
42+
browsers,
43+
node: 'current'
44+
};
45+
```
46+
47+
</details>
48+
2149

2250
Applications
2351
------------------------------------------------------------------------------

0 commit comments

Comments
 (0)