Skip to content

Commit ae2c1a5

Browse files
authored
fix(cdn): Fix es5 CDN bundles (#7544)
Due to some weird
1 parent 1c181cc commit ae2c1a5

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

docs/new-sdk-release-checklist.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ This page serves as a checklist of what to do when releasing a new SDK for the f
4444
- **This is especially important, if you're adding new CDN bundles!**
4545
- Tarballs (*.tgz archives) should work OOTB
4646

47+
48+
- [ ] Make sure it is added to `bundlePlugins.ts:makeTSPlugin` as `paths`, otherwise it will not be ES5 transpiled correctly for CDN builds.
49+
4750
## Cutting the Release
4851

4952
When you’re ready to make the first release, there are a couple of steps that need to be performed in the **correct order**. Note that you can prepare the PRs at any time but the **merging oder** is important:
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
22
"extends": "../../tsconfig.json",
3+
4+
"include": ["src/**/*"],
5+
36
"compilerOptions": {
4-
"module": "esnext",
5-
"lib": ["ES6"],
6-
"esModuleInterop": true,
7-
"target": "es6",
8-
"strictPropertyInitialization": false
9-
},
10-
"include": ["src/**/*.ts"]
7+
// package-specific options
8+
}
119
}

rollup/bundleHelpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function makeBaseBundleConfig(options) {
3030
const cleanupPlugin = makeCleanupPlugin();
3131
const markAsBrowserBuildPlugin = makeBrowserBuildPlugin(true);
3232
const licensePlugin = makeLicensePlugin(licenseTitle);
33-
const tsPlugin = makeTSPlugin(jsVersion.toLowerCase());
33+
const tsPlugin = makeTSPlugin('es5');
3434

3535
// The `commonjs` plugin is the `esModuleInterop` of the bundling world. When used with `transformMixedEsModules`, it
3636
// will include all dependencies, imported or required, in the final bundle. (Without it, CJS modules aren't included

rollup/plugins/bundlePlugins.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ export function makeTSPlugin(jsVersion) {
147147
'@sentry/hub': ['../hub/src'],
148148
'@sentry/types': ['../types/src'],
149149
'@sentry/utils': ['../utils/src'],
150+
'@sentry-internal/integration-shims': ['../integration-shims/src'],
151+
'@sentry-internal/tracing': ['../tracing-internal/src'],
150152
},
151153
baseUrl: '.',
152154
},

0 commit comments

Comments
 (0)