Skip to content

Commit

Permalink
✨ Support ES Modules and CommonJS [fix travis]
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz committed Apr 4, 2020
1 parent 4efc70e commit c9aa314
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,26 @@ jobs:
- stage: test
env: STEP=COMMONJS_ESM
script:
- PROJECT_ROOT_PATH="$(pwd)"
- npm run build:prod
- npm link
- cd test/esm
# Node 8 does not understand ES modules
- cd PROJECT_ROOT_PATH
- npm link # `npm link` has to be done for each version of node
- cd test/esm
- nvm install 8
- node --version
- sh run.sh
# Node 12 requires a flag to support ES modules but can understand them
- cd PROJECT_ROOT_PATH
- npm link
- cd test/esm
- nvm install 12
- node --version
- sh run.sh
# Node >=13.2.0 enables support for ES modules by default
- cd PROJECT_ROOT_PATH
- npm link
- cd test/esm
- nvm install 13
- node --version
- sh run.sh
Expand Down

0 comments on commit c9aa314

Please sign in to comment.