Skip to content

Commit

Permalink
[adapter-cloudflare-workers] add es2020 target to esbuild function to…
Browse files Browse the repository at this point in the history
… solve Unexpected character '#' error (#1287)

* add es2020 target to esbuild to solve Unexpected character '#' error

* add changeset
  • Loading branch information
jacob-8 authored May 1, 2021
1 parent 3b21b7e commit 9e67505
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-wasps-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-cloudflare-workers': patch
---

Add es2020 target to esbuild function to solve Unexpected character '#' error
1 change: 1 addition & 0 deletions packages/adapter-cloudflare-workers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = function () {
entryPoints: ['.svelte/cloudflare-workers/entry.js'],
outfile: `${entrypoint}/index.js`,
bundle: true,
target: 'es2020',
platform: 'node' // TODO would be great if we could generate ESM and use type = "javascript"
});

Expand Down

0 comments on commit 9e67505

Please sign in to comment.