Skip to content

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 authored and DerekNonGeneric committed Feb 20, 2020
1 parent 8f3b564 commit e5041a0
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 e5041a0

Please sign in to comment.