Subsequent recipes will assume an environment that is capable of using ES modules. There are two strategies for accomplishing this: creating a build step that collects all the modules used into a single file for the browser to download, or using a browser that is capable of using ES modules. This recipe demonstrates the latter option.
Installing and configuring - Chrome
Getting ready
To step through this recipe, you need a computer with an operating system (OS) that is supported by Chrome (not Chromium). It supports recent versions of Windows and macOS, as well as a large number of Linux distributions. Most likely, if your OS doesn't support this browser, you are already aware of this.
How to do it...
- To download Chrome, navigate your browser to the following:
https://www.google.co.in/chrome/. - Click Download and accept the terms of service.
- After the installer finishes downloading, double-click the installer to launch it and follow the onscreen instructions.
- To check the version of Chrome, open the Chrome browser, and enter the following URL:
chrome://settings/help. - You should see the Version number where the number is 61 or higher. See the following screenshot:
How it works...
The current versions of Chrome come with ES modules enabled out of the box. So no configuration or plugins are required to get them working!
There's more...
At the time of writing, only a few browsers support ECMAScript. You can see which browsers support modules under the Browser compatibility section of the page at https://mzl.la/1PY7nnm.