Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4841

How to import a different config file

$
0
0

@alvincrespo wrote:

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

Example:

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`

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4841

Latest Images

Trending Articles



Latest Images