Skip to content

Commit

Permalink
feat: only attempts to find config when payload is initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikrut committed Jul 23, 2021
1 parent d418599 commit 266ccb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import findConfig from './find';
import validate from './validate';
import babelConfig from '../babel.config';

const configPath = findConfig();

const removedExtensions = ['.scss', '.css', '.svg', '.png', '.jpg', '.eot', '.ttf', '.woff', '.woff2'];

const loadConfig = (): Config => {
const configPath = findConfig();

removedExtensions.forEach((ext) => {
require.extensions[ext] = () => null;
});
Expand Down

0 comments on commit 266ccb3

Please sign in to comment.