@sveltejs/adapter-netlify 7.0.0 → 7.0.1
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 +15 -3
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -402,7 +402,9 @@ function to_import_specifier(path) {
|
|
|
402
402
|
|
|
403
403
|
/** @satisfies {import('rolldown').BuildOptions} */
|
|
404
404
|
const rolldown_config = {
|
|
405
|
-
|
|
405
|
+
// Mirror Netlify's edge-bundler behaviour for externalising Node.js built-ins
|
|
406
|
+
// see https://github.com/netlify/build/blob/main/packages/edge-bundler/node/npm_dependencies.ts#L289-L309
|
|
407
|
+
platform: 'node',
|
|
406
408
|
output: {
|
|
407
409
|
sourcemap: true,
|
|
408
410
|
codeSplitting: false
|
|
@@ -412,9 +414,19 @@ const rolldown_config = {
|
|
|
412
414
|
},
|
|
413
415
|
// Node built-ins are allowed, but must be prefixed with `node:`
|
|
414
416
|
// https://docs.netlify.com/edge-functions/api/#runtime-environment
|
|
415
|
-
external: builtinModules.map((id) => `node:${id}`),
|
|
416
417
|
resolve: {
|
|
417
|
-
alias: Object.fromEntries(builtinModules.map((id) => [id, `node:${id}`]))
|
|
418
|
+
alias: Object.fromEntries(builtinModules.map((id) => [id, `node:${id}`])),
|
|
419
|
+
mainFields: ['module', 'browser', 'main']
|
|
420
|
+
},
|
|
421
|
+
// Rolldown's default does not handle these files automatically
|
|
422
|
+
// see https://github.com/rolldown/rolldown/blob/main/crates/rolldown/src/utils/prepare_build_context.rs#L320-L336
|
|
423
|
+
moduleTypes: {
|
|
424
|
+
'.wasm': 'copy',
|
|
425
|
+
'.woff': 'copy',
|
|
426
|
+
'.woff2': 'copy',
|
|
427
|
+
'.ttf': 'copy',
|
|
428
|
+
'.eot': 'copy',
|
|
429
|
+
'.otf': 'copy'
|
|
418
430
|
}
|
|
419
431
|
};
|
|
420
432
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/adapter-netlify",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "A SvelteKit adapter that creates a Netlify app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"ambient.d.ts"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@netlify/types": "^
|
|
37
|
+
"@netlify/types": "^3.0.0",
|
|
38
38
|
"rolldown": "^1.2.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@netlify/edge-functions": "^
|
|
42
|
-
"@sveltejs/kit": "^3.0.
|
|
41
|
+
"@netlify/edge-functions": "^4.0.0",
|
|
42
|
+
"@sveltejs/kit": "^3.0.1",
|
|
43
43
|
"@types/deno": "^2.7.0",
|
|
44
44
|
"@types/node": "^22.19.19",
|
|
45
45
|
"@typescript/native": "npm:typescript@^7.0.2",
|