File tree 4 files changed +20
-4
lines changed
4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @sveltejs/adapter-vercel ' : patch
3
+ ---
4
+
5
+ Expose external option
Original file line number Diff line number Diff line change @@ -14,11 +14,17 @@ import vercel from '@sveltejs/adapter-vercel';
14
14
export default {
15
15
kit: {
16
16
...
17
- adapter: vercel ()
17
+ adapter: vercel (options )
18
18
}
19
19
};
20
20
```
21
21
22
+ ## Options
23
+
24
+ You can pass an ` options ` argument, if necessary, with the following:
25
+
26
+ - ` external ` — an array of dependencies that [ esbuild] ( https://esbuild.github.io/api/#external ) should treat as external
27
+
22
28
## Changelog
23
29
24
30
[ The Changelog for this package is available on GitHub] ( https://github.com/sveltejs/kit/blob/master/packages/adapter-vercel/CHANGELOG.md ) .
Original file line number Diff line number Diff line change 1
1
import { Adapter } from '@sveltejs/kit' ;
2
2
3
- declare function plugin ( ) : Adapter ;
3
+ type Options = {
4
+ external ?: string [ ] ;
5
+ } ;
6
+
7
+ declare function plugin ( options ?: Options ) : Adapter ;
4
8
export = plugin ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import esbuild from 'esbuild';
6
6
const dir = '.vercel_build_output' ;
7
7
8
8
/** @type {import('.') } **/
9
- export default function ( ) {
9
+ export default function ( { external = [ ] } = { } ) {
10
10
return {
11
11
name : '@sveltejs/adapter-vercel' ,
12
12
@@ -52,7 +52,8 @@ export default function () {
52
52
outfile : `${ dirs . lambda } /index.js` ,
53
53
target : 'node14' ,
54
54
bundle : true ,
55
- platform : 'node'
55
+ platform : 'node' ,
56
+ external
56
57
} ) ;
57
58
58
59
writeFileSync ( `${ dirs . lambda } /package.json` , JSON . stringify ( { type : 'commonjs' } ) ) ;
You can’t perform that action at this time.
0 commit comments