Skip to content

Commit

Permalink
fix: browser builds
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Aug 8, 2024
1 parent 9e69599 commit 4d20061
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,16 @@ for MODULE_TYPE in esm cjs; do
done

# Move browser files into place for browser builds
for FILE in ${BROWSER_DIR}/*-browser*;do
mv $FILE ${FILE/-browser/}
done
(
# Temporarily cd into BROWSER_DIR to avoid having to deal with "-browser"
# appearing in both the dir name and file name of FILE's full path
cd ${BROWSER_DIR}

for FILE in *-browser*;do
echo "mv $FILE ${FILE/-browser/}"
mv $FILE ${FILE/-browser/}
done
)

# esm/cjs-specific logic
if [ "$MODULE_TYPE" = "esm" ]; then
Expand Down

0 comments on commit 4d20061

Please sign in to comment.