How can I access a JSON file in ECMAScript 6?

The following doesn’t work:

import config from '../config.json'

This works fine if I try to import a JavaScript file.

19 Answers
19

Leave a Reply

Your email address will not be published. Required fields are marked *