-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tracing): Add ES6 tracing bundle (#4674)
This adds an ES6 version of our tracing CDN bundle, both for the sake of users and as a step towards becoming ES6-first in v7. It also adds the new bundle to the size check and the playwright integration tests. A note about the new bundle is added to the docs in getsentry/sentry-docs#4789.
- Loading branch information
1 parent
7f94831
commit 845aada
Showing
3 changed files
with
39 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
import { makeBaseBundleConfig, makeLicensePlugin, terserPlugin } from '../../rollup.config'; | ||
|
||
const builds = []; | ||
|
||
const licensePlugin = makeLicensePlugin('@sentry/tracing & @sentry/browser'); | ||
|
||
const baseBundleConfig = makeBaseBundleConfig({ | ||
input: 'src/index.bundle.ts', | ||
isAddOn: false, | ||
jsVersion: 'es5', | ||
outputFileBase: 'build/bundle.tracing', | ||
['es5', 'es6'].forEach(jsVersion => { | ||
const baseBundleConfig = makeBaseBundleConfig({ | ||
input: 'src/index.bundle.ts', | ||
isAddOn: false, | ||
jsVersion, | ||
outputFileBase: `build/bundle.tracing${jsVersion === 'es6' ? '.es6' : ''}`, | ||
}); | ||
|
||
builds.push( | ||
...[ | ||
{ | ||
...baseBundleConfig, | ||
output: { | ||
...baseBundleConfig.output, | ||
file: `${baseBundleConfig.output.file}.js`, | ||
}, | ||
plugins: [...baseBundleConfig.plugins, licensePlugin], | ||
}, | ||
{ | ||
...baseBundleConfig, | ||
output: { | ||
...baseBundleConfig.output, | ||
file: `${baseBundleConfig.output.file}.min.js`, | ||
}, | ||
plugins: [...baseBundleConfig.plugins, terserPlugin, licensePlugin], | ||
}, | ||
], | ||
); | ||
}); | ||
|
||
export default [ | ||
// ES5 Browser Tracing Bundle | ||
{ | ||
...baseBundleConfig, | ||
output: { | ||
...baseBundleConfig.output, | ||
file: `${baseBundleConfig.output.file}.js`, | ||
}, | ||
plugins: [...baseBundleConfig.plugins, licensePlugin], | ||
}, | ||
{ | ||
...baseBundleConfig, | ||
output: { | ||
...baseBundleConfig.output, | ||
file: `${baseBundleConfig.output.file}.min.js`, | ||
}, | ||
plugins: [...baseBundleConfig.plugins, terserPlugin, licensePlugin], | ||
}, | ||
]; | ||
export default builds; |