Skip to content

Commit c8ec08e

Browse files
committed
revert original change
1 parent e6e3df0 commit c8ec08e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

packages/kit/src/core/sync/write_client_manifest.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,13 @@ export function write_client_manifest(kit, manifest_data, output, metadata) {
161161
162162
export const dictionary = ${dictionary};
163163
164-
// This indirection prevents Rollup from issuing a warning when hooks aren't defined
165-
const HANDLE_ERROR = 'handleError';
166-
const INIT = 'init';
167-
const REROUTE = 'reroute';
168-
const TRANSPORT = 'transport';
169-
170164
export const hooks = {
171165
handleError: ${
172-
client_hooks_file ? 'client_hooks[HANDLE_ERROR] || ' : ''
166+
client_hooks_file ? 'client_hooks.handleError || ' : ''
173167
}(({ error }) => { console.error(error) }),
174-
${client_hooks_file ? 'init: client_hooks[INIT],' : ''}
175-
reroute: ${universal_hooks_file ? 'universal_hooks[REROUTE] || ' : ''}(() => {}),
176-
transport: ${universal_hooks_file ? 'universal_hooks[TRANSPORT] || ' : ''}{}
168+
${client_hooks_file ? 'init: client_hooks.init,' : ''}
169+
reroute: ${universal_hooks_file ? 'universal_hooks.reroute || ' : ''}(() => {}),
170+
transport: ${universal_hooks_file ? 'universal_hooks.transport || ' : ''}{}
177171
};
178172
179173
export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));

0 commit comments

Comments
 (0)