@sveltejs/kit 1.0.0-next.343 → 1.0.0-next.346
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/assets/client/start.js +8 -2
- package/assets/server/index.js +2 -9
- package/dist/chunks/index.js +1258 -448
- package/dist/chunks/index2.js +88 -1355
- package/dist/chunks/index3.js +165 -99
- package/dist/chunks/index4.js +227 -147
- package/dist/chunks/index5.js +15690 -198
- package/dist/chunks/plugin.js +538 -0
- package/dist/chunks/sync.js +6 -8
- package/dist/chunks/write_tsconfig.js +12 -4
- package/dist/cli.js +73 -35
- package/package.json +3 -3
- package/types/internal.d.ts +2 -0
- package/types/private.d.ts +2 -2
- package/dist/chunks/index6.js +0 -15749
package/assets/client/start.js
CHANGED
|
@@ -1398,6 +1398,12 @@ function create_client({ target, session, base, trailing_slash }) {
|
|
|
1398
1398
|
return new Promise(() => {});
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
|
+
if (import.meta.hot) {
|
|
1402
|
+
import.meta.hot.on('vite:beforeUpdate', () => {
|
|
1403
|
+
if (current.error) location.reload();
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1401
1407
|
return {
|
|
1402
1408
|
after_navigate: (fn) => {
|
|
1403
1409
|
onMount(() => {
|
|
@@ -1668,7 +1674,7 @@ function create_client({ target, session, base, trailing_slash }) {
|
|
|
1668
1674
|
}
|
|
1669
1675
|
|
|
1670
1676
|
const node = await load_node({
|
|
1671
|
-
module: await nodes[i],
|
|
1677
|
+
module: await components[nodes[i]](),
|
|
1672
1678
|
url,
|
|
1673
1679
|
params,
|
|
1674
1680
|
stuff,
|
|
@@ -1750,7 +1756,7 @@ function create_client({ target, session, base, trailing_slash }) {
|
|
|
1750
1756
|
* hydrate: {
|
|
1751
1757
|
* status: number;
|
|
1752
1758
|
* error: Error;
|
|
1753
|
-
* nodes:
|
|
1759
|
+
* nodes: number[];
|
|
1754
1760
|
* params: Record<string, string>;
|
|
1755
1761
|
* routeId: string | null;
|
|
1756
1762
|
* };
|
package/assets/server/index.js
CHANGED
|
@@ -1231,11 +1231,7 @@ async function render_response({
|
|
|
1231
1231
|
hydrate: ${resolve_opts.ssr && page_config.hydrate ? `{
|
|
1232
1232
|
status: ${status},
|
|
1233
1233
|
error: ${serialize_error(error)},
|
|
1234
|
-
nodes: [
|
|
1235
|
-
${(branch || [])
|
|
1236
|
-
.map(({ node }) => `import(${s(options.prefix + node.entry)})`)
|
|
1237
|
-
.join(',\n\t\t\t\t\t\t')}
|
|
1238
|
-
],
|
|
1234
|
+
nodes: [${branch.map(({ node }) => node.index).join(', ')}],
|
|
1239
1235
|
params: ${devalue(event.params)},
|
|
1240
1236
|
routeId: ${s(event.routeId)}
|
|
1241
1237
|
}` : 'null'}
|
|
@@ -2235,10 +2231,7 @@ async function load_node({
|
|
|
2235
2231
|
}
|
|
2236
2232
|
|
|
2237
2233
|
response = await respond(
|
|
2238
|
-
|
|
2239
|
-
// (https://github.com/sveltejs/kit/issues/3728) — which is fine, because
|
|
2240
|
-
// we only need the headers
|
|
2241
|
-
new Request(new URL(requested, event.url).href, { ...opts, credentials: undefined }),
|
|
2234
|
+
new Request(new URL(requested, event.url).href, { ...opts }),
|
|
2242
2235
|
options,
|
|
2243
2236
|
{
|
|
2244
2237
|
...state,
|