Skip to content

Commit

Permalink
use es2022 instead of es2020 - closes sveltejs#8980 (sveltejs#9293)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Mar 3, 2023
1 parent e59b2fc commit 9e9a10f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/popular-jeans-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sveltejs/adapter-cloudflare': minor
'@sveltejs/adapter-cloudflare-workers': minor
---

feat: use `es2022` target
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare-workers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function ({ config = 'wrangler.toml' } = {}) {
platform: 'browser',
conditions: ['worker', 'browser'],
sourcemap: 'linked',
target: 'es2020',
target: 'es2022',
entryPoints: [`${tmp}/entry.js`],
outfile: main,
bundle: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function (options = {}) {
platform: 'browser',
conditions: ['worker', 'browser'],
sourcemap: 'linked',
target: 'es2020',
target: 'es2022',
entryPoints: [`${tmp}/_worker.js`],
outfile: `${dest}/_worker.js`,
allowOverwrite: true,
Expand Down

0 comments on commit 9e9a10f

Please sign in to comment.