From 8f09e5e7cc436d7baa48f855b8344c59f4d19fc4 Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Wed, 28 Mar 2018 22:29:32 +0200 Subject: [PATCH] Ensure that module can be required in node without errors See https://github.com/video-dev/hls.js/pull/1841 >We have this library bundled and running in an isomorphic application, but on the server nothing is ever called. It just needs to be bundled safely. --- scripts/travis.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/travis.sh b/scripts/travis.sh index 3d3b71f9ed9..c4ab2d5fffe 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -7,6 +7,9 @@ npm install if [ "${TRAVIS_MODE}" = "build" ]; then npm run lint npm run build + # check that hls.js doesn't error if requiring in node + # see https://github.com/video-dev/hls.js/pull/1642 + node -e 'require("./" + require("./package.json").main)' elif [ "${TRAVIS_MODE}" = "unitTests" ]; then npm run test:unit elif [ "${TRAVIS_MODE}" = "funcTests" ]; then