Skip to content

Commit

Permalink
Normalize config importing
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiuch committed Jan 22, 2017
1 parent 0070c7f commit 5faf10d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-cosmos-webpack/src/entry.js
@@ -1,5 +1,7 @@
/* global window */

import importModule from 'react-cosmos-utils/lib/import-module';

const loaderUri = '/loader/';
const { pathname } = window.location;
const isLoader = pathname === loaderUri;
Expand All @@ -17,7 +19,7 @@ const getConfig = require('./config').default;

// eslint-disable-next-line no-undef
const userConfig = require(COSMOS_CONFIG_PATH);
const { proxies, containerQuerySelector, ignore } = getConfig(userConfig);
const { proxies, containerQuerySelector, ignore } = getConfig(importModule(userConfig));

const start = () => {
// Module is imported whenever this function is called, making sure the
Expand Down

0 comments on commit 5faf10d

Please sign in to comment.