@sveltejs/adapter-netlify 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join, resolve, posix } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { builtinModules } from 'node:module';
|
|
4
5
|
import esbuild from 'esbuild';
|
|
5
6
|
import toml from '@iarna/toml';
|
|
6
7
|
|
|
@@ -165,7 +166,12 @@ async function generate_edge_functions({ builder }) {
|
|
|
165
166
|
format: 'esm',
|
|
166
167
|
platform: 'browser',
|
|
167
168
|
sourcemap: 'linked',
|
|
168
|
-
target: 'es2020'
|
|
169
|
+
target: 'es2020',
|
|
170
|
+
|
|
171
|
+
// Node built-ins are allowed, but must be prefixed with `node:`
|
|
172
|
+
// https://docs.netlify.com/edge-functions/api/#runtime-environment
|
|
173
|
+
external: builtinModules.map((id) => `node:${id}`),
|
|
174
|
+
alias: Object.fromEntries(builtinModules.map((id) => [id, `node:${id}`]))
|
|
169
175
|
});
|
|
170
176
|
|
|
171
177
|
writeFileSync('.netlify/edge-functions/manifest.json', JSON.stringify(edge_manifest));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/adapter-netlify",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "A SvelteKit adapter that creates a Netlify app",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"rollup": "^4.9.5",
|
|
40
40
|
"typescript": "^5.3.3",
|
|
41
41
|
"vitest": "^1.2.0",
|
|
42
|
-
"@sveltejs/kit": "^2.4.
|
|
42
|
+
"@sveltejs/kit": "^2.4.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@sveltejs/kit": "^2.4.0"
|