Skip to content

fix(cdn): Fix es5 CDN bundles #7544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/new-sdk-release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ This page serves as a checklist of what to do when releasing a new SDK for the f
- **This is especially important, if you're adding new CDN bundles!**
- Tarballs (*.tgz archives) should work OOTB


- [ ] Make sure it is added to `bundlePlugins.ts:makeTSPlugin` as `paths`, otherwise it will not be ES5 transpiled correctly for CDN builds.

## Cutting the Release

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:
Expand Down
12 changes: 5 additions & 7 deletions packages/integration-shims/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"extends": "../../tsconfig.json",

"include": ["src/**/*"],

"compilerOptions": {
"module": "esnext",
"lib": ["ES6"],
"esModuleInterop": true,
"target": "es6",
"strictPropertyInitialization": false
},
"include": ["src/**/*.ts"]
// package-specific options
}
}
2 changes: 1 addition & 1 deletion rollup/bundleHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function makeBaseBundleConfig(options) {
const cleanupPlugin = makeCleanupPlugin();
const markAsBrowserBuildPlugin = makeBrowserBuildPlugin(true);
const licensePlugin = makeLicensePlugin(licenseTitle);
const tsPlugin = makeTSPlugin(jsVersion.toLowerCase());
const tsPlugin = makeTSPlugin('es5');

// The `commonjs` plugin is the `esModuleInterop` of the bundling world. When used with `transformMixedEsModules`, it
// will include all dependencies, imported or required, in the final bundle. (Without it, CJS modules aren't included
Expand Down
2 changes: 2 additions & 0 deletions rollup/plugins/bundlePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ export function makeTSPlugin(jsVersion) {
'@sentry/hub': ['../hub/src'],
'@sentry/types': ['../types/src'],
'@sentry/utils': ['../utils/src'],
'@sentry-internal/integration-shims': ['../integration-shims/src'],
'@sentry-internal/tracing': ['../tracing-internal/src'],
},
baseUrl: '.',
},
Expand Down