@@ -17,12 +17,6 @@ import { copy_assets, posixify, resolve_entry } from '../utils.js';
17
17
/** @param {any } value */
18
18
const s = ( value ) => JSON . stringify ( value ) ;
19
19
20
- /** @typedef {Record<string, {
21
- * file: string;
22
- * css: string[];
23
- * imports: string[];
24
- * }>} ClientManifest */
25
-
26
20
/**
27
21
* @param {import('types/config').ValidatedConfig } config
28
22
* @param {{
@@ -113,7 +107,6 @@ async function build_client({
113
107
process . env . VITE_SVELTEKIT_AMP = config . kit . amp ? 'true' : '' ;
114
108
115
109
const client_out_dir = `${ output_dir } /client/${ config . kit . appDir } ` ;
116
- const client_manifest_file = `${ client_out_dir } /manifest.json` ;
117
110
118
111
/** @type {Record<string, string> } */
119
112
const input = {
@@ -188,7 +181,8 @@ async function build_client({
188
181
189
182
await vite . build ( merged_config ) ;
190
183
191
- /** @type {ClientManifest } */
184
+ const client_manifest_file = `${ client_out_dir } /manifest.json` ;
185
+ /** @type {import('vite').Manifest } */
192
186
const client_manifest = JSON . parse ( fs . readFileSync ( client_manifest_file , 'utf-8' ) ) ;
193
187
fs . renameSync ( client_manifest_file , `${ output_dir } /manifest.json` ) ; // inspectable but not shipped
194
188
@@ -206,7 +200,7 @@ async function build_client({
206
200
* client_entry_file: string;
207
201
* service_worker_entry_file: string | null;
208
202
* }} options
209
- * @param {ClientManifest } client_manifest
203
+ * @param {import('vite').Manifest } client_manifest
210
204
* @param {string } runtime
211
205
*/
212
206
async function build_server (
@@ -512,7 +506,7 @@ async function build_server(
512
506
* client_entry_file: string;
513
507
* service_worker_entry_file: string | null;
514
508
* }} options
515
- * @param {ClientManifest } client_manifest
509
+ * @param {import('vite').Manifest } client_manifest
516
510
*/
517
511
async function build_service_worker (
518
512
{ cwd, assets_base, config, manifest, build_dir, output_dir, service_worker_entry_file } ,
0 commit comments