Skip to content

Commit 8151fa1

Browse files
remove sourcemap link from umd build
1 parent 4db0dbd commit 8151fa1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
"build-umd:stats": "webpack --progress --env production --json > ./stats/stat_results.json",
8383
"build-cjs": "rimraf lib && cross-env NODE_ENV=cjs babel ./src -d lib --ignore 'src/**/__tests__/*'",
8484
"postbuild-cjs": "cross-env NODE_ENV=cjs node scripts/copy.packages.json.js",
85-
"build-umd:ci": "webpack --config webpack.ci.dev.js --env.branch=$BUILD_BRANCH --env.commit_hash=$BUILD_COMMIT && webpack --config webpack.ci.prod.js --env.branch=$BUILD_BRANCH --env.commit_hash=$BUILD_COMMIT",
86-
"build-umd": "webpack --config webpack.dev.js && webpack --config webpack.prod.js",
85+
"build-umd:ci": "webpack --config webpack.ci.dev.js --env.branch=$BUILD_BRANCH --env.commit_hash=$BUILD_COMMIT && webpack --config webpack.ci.prod.js --env.branch=$BUILD_BRANCH --env.commit_hash=$BUILD_COMMIT && ./scripts/clean_umd_build.sh",
86+
"build-umd": "webpack --config webpack.dev.js && webpack --config webpack.prod.js && ./scripts/clean_umd_build.sh",
8787
"build": "rimraf lib umd es && npm run build-cjs && npm run build-es && npm run build-umd",
8888
"build:npm": "rimraf lib es && npm run build-cjs && npm run build-es",
8989
"build:ci": "rimraf lib umd es && npm run build-cjs && npm run build-es && npm run build-umd:ci",

scripts/clean_umd_build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# replace splitio-commons imports to use its ES modules build
4+
replace '//# sourceMappingURL=unfetch.module.js.map' '' ./umd -r
5+
6+
if [ $? -eq 0 ]
7+
then
8+
exit 0
9+
else
10+
exit 1
11+
fi

0 commit comments

Comments
 (0)