Skip to content

Commit fe36733

Browse files
committed
fix: ensure es2020 compat
1 parent 51b687f commit fe36733

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

dev-packages/rollup-utils/bundleHelpers.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ export function makeBaseBundleConfig(options) {
104104
// Point to the package's tsconfig.json so rolldown respects TypeScript & JSX settings
105105
tsconfig: path.resolve(process.cwd(), './tsconfig.json'),
106106

107+
// Enforce ES2020 target for all builds
108+
transform: {
109+
target: 'es2020',
110+
},
111+
107112
output: {
108113
// a file extension will be added to this base value when we specify either a minified or non-minified build
109114
entryFileNames: outputFileBase,

dev-packages/rollup-utils/npmHelpers.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ export function makeBaseNPMConfig(options = {}) {
9292
},
9393
},
9494

95+
// Enforce ES2020 target for all builds
96+
transform: {
97+
target: 'es2020',
98+
},
99+
95100
plugins: [debugBuildStatementReplacePlugin, rrwebBuildPlugin],
96101

97102
// don't include imported modules from outside the package in the final output

packages/replay-worker/rollup.worker.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ const config = defineConfig([
2424
minify: true,
2525
},
2626
treeshake: treeShakePreset('smallest'),
27+
transform: {
28+
target: 'es2020',
29+
},
2730
plugins: [
2831
{
2932
name: 'worker-to-string',
@@ -42,6 +45,9 @@ const config = defineConfig([
4245
minify: true,
4346
},
4447
treeshake: treeShakePreset('smallest'),
48+
transform: {
49+
target: 'es2020',
50+
},
4551
},
4652
]);
4753

0 commit comments

Comments
 (0)