Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
chore: toggle --experimental-json-modules flag usage
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed Oct 11, 2021
1 parent 7afab48 commit 84543f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ if [ -f "./node_modules/ts-node/esm.mjs" ]; then
# Silence warnings
NODE_NO_WARNINGS=1

# Import JSON modules
JSON_MODULES=''
[ !$GITHUB_ACTIONS ] && JSON_MODULES='--experimental-json-modules'

# Don't require imported modules to include extensions
SPECIFIER_RESOLUTION='--es-module-specifier-resolution node'

# Use custom ESM loader
LOADER='--loader ./tools/loaders/esm.js'

# Specify Node options
NODE_OPTIONS="$SPECIFIER_RESOLUTION $LOADER"
NODE_OPTIONS="$JSON_MODULES $SPECIFIER_RESOLUTION $LOADER"
fi

0 comments on commit 84543f7

Please sign in to comment.