Skip to content

Commit

Permalink
Merge pull request #50 from ijlee2/add-warning-to-readme
Browse files Browse the repository at this point in the history
Added installation instructions for FastBoot users
  • Loading branch information
ijlee2 authored Aug 4, 2020
2 parents 2efedd0 + 1beb39a commit 7860aff
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,33 @@ Installation
ember install ember-container-query
```

<details>
<summary>Use FastBoot? ⚠️</summary>

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:

```bash
/var/folders/2z/93zyyhx13rs879qr8rzyxrb40000gn/T/broccoli-689520dxo26a682Mz/out-529-broccoli_merge_trees/assets/vendor.js:121232
return this.args.features ?? {};
^
SyntaxError: Unexpected token '?'
```

To prevent this, please make sure to add `node: 'current'` to your `config/targets.js` file.

```javascript
'use strict';

const browsers = [ ... ];

module.exports = {
browsers,
node: 'current'
};
```

</details>


Applications
------------------------------------------------------------------------------
Expand Down

0 comments on commit 7860aff

Please sign in to comment.