Skip to content

Commit

Permalink
Merge pull request #257 from bertdeblock/fix/importing-config-file-as…
Browse files Browse the repository at this point in the history
…-cjs-module

Fix importing config file as CJS module
  • Loading branch information
Turbo87 authored Oct 14, 2020
2 parents 326e201 + 9f6ac97 commit cb297e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ function readConfig(cwd) {

let config = {};
if (fs.existsSync(configPath)) {
let requireESM = require('esm')(module);
config = requireESM(configPath).default;
let requireESM = require('esm')(module, { cjs: { dedefault: true } });
config = requireESM(configPath);
}

return config;
Expand Down

0 comments on commit cb297e3

Please sign in to comment.