How to import a different config file

Quick Question. How does one load in a different config file into a project?


I have a data.js file under my-app/config/data.js which exports an array as the default:

module.exports = [ 'some-data' ];

I then import it into a component like so:

import data from 'my-app/config/data';

But I get the following error:

Uncaught Error: Could not find module `my-app/config/data` imported from `my-app/pods/components/some-component/component`

Believe you should be using ES6 to export your array:

export default ['some-data']

Note: hasn’t been checked, but you seem to be using CommonJS exports which aren’t normally seen in Ember frontend code