File tree 3 files changed +23
-5
lines changed
adapter-cloudflare-workers
3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @sveltejs/adapter-cloudflare ' : patch
3
+ ' @sveltejs/adapter-cloudflare-workers ' : patch
4
+ ---
5
+
6
+ [ breaking] Don't pass arbitrary options to esbuild
Original file line number Diff line number Diff line change @@ -15,7 +15,14 @@ import { fileURLToPath } from 'url';
15
15
*/
16
16
17
17
/** @type {import('.').default } */
18
- export default function ( options = { } ) {
18
+ export default function ( ) {
19
+ // TODO remove for 1.0
20
+ if ( arguments . length > 0 ) {
21
+ throw new Error (
22
+ 'esbuild options can no longer be passed to adapter-cloudflare-workers — see https://github.com/sveltejs/kit/pull/4639'
23
+ ) ;
24
+ }
25
+
19
26
return {
20
27
name : '@sveltejs/adapter-cloudflare-workers' ,
21
28
@@ -58,11 +65,10 @@ export default function (options = {}) {
58
65
platform : 'browser' ,
59
66
sourcemap : 'linked' ,
60
67
target : 'es2020' ,
61
- ...options ,
62
68
entryPoints : [ `${ tmp } /entry.js` ] ,
63
69
outfile : main ,
64
70
bundle : true ,
65
- external : [ '__STATIC_CONTENT_MANIFEST' , ... ( options ?. external || [ ] ) ] ,
71
+ external : [ '__STATIC_CONTENT_MANIFEST' ] ,
66
72
format : 'esm'
67
73
} ) ;
68
74
Original file line number Diff line number Diff line change @@ -4,7 +4,14 @@ import { fileURLToPath } from 'url';
4
4
import * as esbuild from 'esbuild' ;
5
5
6
6
/** @type {import('.').default } */
7
- export default function ( options = { } ) {
7
+ export default function ( ) {
8
+ // TODO remove for 1.0
9
+ if ( arguments . length > 0 ) {
10
+ throw new Error (
11
+ 'esbuild options can no longer be passed to adapter-cloudflare — see https://github.com/sveltejs/kit/pull/4639'
12
+ ) ;
13
+ }
14
+
8
15
return {
9
16
name : '@sveltejs/adapter-cloudflare' ,
10
17
async adapt ( builder ) {
@@ -40,7 +47,6 @@ export default function (options = {}) {
40
47
platform : 'browser' ,
41
48
sourcemap : 'linked' ,
42
49
target : 'es2020' ,
43
- ...options ,
44
50
entryPoints : [ `${ tmp } /_worker.js` ] ,
45
51
outfile : `${ dest } /_worker.js` ,
46
52
allowOverwrite : true ,
You can’t perform that action at this time.
0 commit comments