File tree 9 files changed +20
-11
lines changed
9 files changed +20
-11
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @sveltejs/adapter-netlify ' : patch
3
+ ' @sveltejs/adapter-node ' : patch
4
+ ' @sveltejs/adapter-vercel ' : patch
5
+ ---
6
+
7
+ Polyfill fetch before running any app code
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import json from '@rollup/plugin-json';
5
5
export default [
6
6
{
7
7
input : {
8
- handler : 'src/handler.js'
8
+ handler : 'src/handler.js' ,
9
+ shims : 'src/shims.js'
9
10
} ,
10
11
output : [
11
12
{
Original file line number Diff line number Diff line change 1
- import { __fetch_polyfill } from '@sveltejs/kit/install-fetch ';
1
+ import './shims ';
2
2
import { App } from './server/app.js' ;
3
3
4
- __fetch_polyfill ( ) ;
5
-
6
4
/**
7
5
*
8
6
* @param {import('@sveltejs/kit').SSRManifest } manifest
Original file line number Diff line number Diff line change
1
+ import { __fetch_polyfill } from '@sveltejs/kit/install-fetch' ;
2
+ __fetch_polyfill ( ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ export default [
6
6
{
7
7
input : {
8
8
index : 'src/index.js' ,
9
- handler : 'src/handler.js'
9
+ handler : 'src/handler.js' ,
10
+ shims : 'src/shims.js'
10
11
} ,
11
12
output : {
12
13
dir : 'files' ,
Original file line number Diff line number Diff line change
1
+ import './shims' ;
1
2
import fs from 'fs' ;
2
3
import path from 'path' ;
3
4
import sirv from 'sirv' ;
4
5
import { fileURLToPath } from 'url' ;
5
6
import { getRawBody } from '@sveltejs/kit/node' ;
6
- import { __fetch_polyfill } from '@sveltejs/kit/install-fetch' ;
7
7
8
8
// @ts -ignore
9
9
import { App } from 'APP' ;
10
10
import { manifest } from 'MANIFEST' ;
11
11
12
- __fetch_polyfill ( ) ;
13
-
14
12
const app = new App ( manifest ) ;
15
13
16
14
const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
Original file line number Diff line number Diff line change
1
+ import { __fetch_polyfill } from '@sveltejs/kit/install-fetch' ;
2
+ __fetch_polyfill ( ) ;
Original file line number Diff line number Diff line change 1
- import { __fetch_polyfill } from '@sveltejs/kit/install-fetch ';
1
+ import './shims ';
2
2
import { getRawBody } from '@sveltejs/kit/node' ;
3
3
import { App } from 'APP' ;
4
4
import { manifest } from 'MANIFEST' ;
5
5
6
- __fetch_polyfill ( ) ;
7
-
8
6
const app = new App ( manifest ) ;
9
7
10
8
export default async ( req , res ) => {
Original file line number Diff line number Diff line change
1
+ import { __fetch_polyfill } from '@sveltejs/kit/install-fetch' ;
2
+ __fetch_polyfill ( ) ;
You can’t perform that action at this time.
0 commit comments