Skip to content

Commit 050a92d

Browse files
committed
fix(build): Skip flags file when building integration bundles (#4906)
In #4842, a `flags.ts` file was added to each package to fix logger treeshaking when using webpack. Because of the way that webpack works, this file has to exist separately in each individual package, including in `@sentry/integrations`. It is not itself an integration, though, so we shouldn't be building a separate CDN bundle for it (let alone six versions of one). This fixes the build script so that we're no longer doing that.
1 parent 6d33c15 commit 050a92d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/integrations/scripts/buildBundles.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ for filepath in ./src/*; do
33

44
file=$(basename $filepath)
55

6-
# the index file is only there for the purposes of npm builds - for the CDN we create a separate bundle for each
7-
# integration - so we can skip it here
8-
if [[ $file == "index.ts" ]]; then
6+
# The index file is only there for the purposes of npm builds (for the CDN we create a separate bundle for each
7+
# integration) and the flags file is just a helper for including or not including debug logging, whose contents gets
8+
# incorporated into each of the individual integration bundles, so we can skip them both here.
9+
if [[ $file == "index.ts" || $file == "flags.ts" ]]; then
910
continue
1011
fi
1112

0 commit comments

Comments
 (0)