@sveltejs/adapter-netlify 7.0.0-next.8 → 7.0.0-next.9
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 +9 -11
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -42,15 +42,15 @@ export default function ({ split = false, edge = edge_set_in_env_var } = {}) {
|
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
if (existsSync(`${builder.config.
|
|
45
|
+
if (existsSync(`${builder.config.files.assets}/_headers`)) {
|
|
46
46
|
throw new Error(
|
|
47
|
-
`The _headers file should be placed in the project root rather than the ${builder.config.
|
|
47
|
+
`The _headers file should be placed in the project root rather than the ${builder.config.files.assets} directory`
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
if (existsSync(`${builder.config.
|
|
51
|
+
if (existsSync(`${builder.config.files.assets}/_redirects`)) {
|
|
52
52
|
throw new Error(
|
|
53
|
-
`The _redirects file should be placed in the project root rather than the ${builder.config.
|
|
53
|
+
`The _redirects file should be placed in the project root rather than the ${builder.config.files.assets} directory`
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -80,7 +80,7 @@ export default function ({ split = false, edge = edge_set_in_env_var } = {}) {
|
|
|
80
80
|
builder.log.minor(`Publishing to "${publish}"`);
|
|
81
81
|
|
|
82
82
|
builder.log.minor('Copying assets...');
|
|
83
|
-
const publish_dir = `${publish}${builder.config.
|
|
83
|
+
const publish_dir = `${publish}${builder.config.paths.base}`;
|
|
84
84
|
builder.writeClient(publish_dir);
|
|
85
85
|
builder.writePrerendered(publish_dir);
|
|
86
86
|
|
|
@@ -387,16 +387,14 @@ async function generate_edge_functions({ builder }) {
|
|
|
387
387
|
// Contains static files
|
|
388
388
|
`/${builder.getAppPath()}/immutable/*`,
|
|
389
389
|
`/${builder.getAppPath()}/version.json`,
|
|
390
|
-
|
|
390
|
+
// the base root and `trailingSlash: 'always'` pages are recorded with a trailing slash
|
|
391
|
+
...builder.prerendered.paths.map((path) => (path === '/' ? path : path.replace(/\/$/, ''))),
|
|
391
392
|
...Array.from(assets).flatMap((asset) => {
|
|
392
393
|
if (asset.endsWith('/index.html')) {
|
|
393
394
|
const dir = asset.replace(/\/index\.html$/, '');
|
|
394
|
-
return [
|
|
395
|
-
`${builder.config.kit.paths.base}/${asset}`,
|
|
396
|
-
`${builder.config.kit.paths.base}/${dir}`
|
|
397
|
-
];
|
|
395
|
+
return [`${builder.config.paths.base}/${asset}`, `${builder.config.paths.base}/${dir}`];
|
|
398
396
|
}
|
|
399
|
-
return `${builder.config.
|
|
397
|
+
return `${builder.config.paths.base}/${asset}`;
|
|
400
398
|
}),
|
|
401
399
|
// Should not be served by SvelteKit at all
|
|
402
400
|
'/.netlify/*'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/adapter-netlify",
|
|
3
|
-
"version": "7.0.0-next.
|
|
3
|
+
"version": "7.0.0-next.9",
|
|
4
4
|
"description": "A SvelteKit adapter that creates a Netlify app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/node": "^22.19.19",
|
|
45
45
|
"typescript": "^7.0.2",
|
|
46
46
|
"vitest": "^4.1.10",
|
|
47
|
-
"@sveltejs/kit": "^3.0.0-next.
|
|
47
|
+
"@sveltejs/kit": "^3.0.0-next.24"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@sveltejs/kit": "^2.31.0"
|