Skip to content

Commit

Permalink
Chore: tests/entry.js module resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed May 8, 2021
1 parent 1d22f5d commit c840f8b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ const entry = process.env.ENTRY && path.resolve(process.env.ENTRY)
|| path.resolve(__dirname, '../src');

export default require(entry);

export function _load(relPath) {
module.exports = require(entry);
function _load(relPath) {
return require(path.join(entry, relPath));
}

_load.resolve = function (relPath) {
return require.resolve(path.join(entry, relPath));
};

export { _load };

0 comments on commit c840f8b

Please sign in to comment.