Skip to content
This repository has been archived by the owner on Jun 22, 2020. It is now read-only.

Commit

Permalink
Get self reference modules working
Browse files Browse the repository at this point in the history
I was partially confused due to a potential spec bug
in package.exports that didn't take into account top-level
application (without a . main)

This now works and has a passing test.

Refs: nodejs/node#30633
  • Loading branch information
MylesBorins committed Nov 25, 2019
1 parent f1f1095 commit fc5ed25
Show file tree
Hide file tree
Showing 8 changed files with 3,627 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.nyc_output/
8 changes: 8 additions & 0 deletions lib/constants.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

/** @type {string} */
export const projectRoot = resolve(__dirname, '../');
Loading

0 comments on commit fc5ed25

Please sign in to comment.