From 00b147347cf4cd9f97387d26a2529aadd341d1ae Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Thu, 1 Aug 2024 11:02:03 +0200 Subject: [PATCH] WIP remove foundql from vite-dev-server not needed blind commit, needs to be checked + figure out missing service worker on docs --- .../src/optimizer/src/plugins/vite-dev-server.ts | 12 ++---------- packages/qwik/src/optimizer/src/plugins/vite.ts | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/qwik/src/optimizer/src/plugins/vite-dev-server.ts b/packages/qwik/src/optimizer/src/plugins/vite-dev-server.ts index b2267765e981..cc6517e241c6 100644 --- a/packages/qwik/src/optimizer/src/plugins/vite-dev-server.ts +++ b/packages/qwik/src/optimizer/src/plugins/vite-dev-server.ts @@ -39,7 +39,6 @@ const encode = (url: string) => function createSymbolMapper( base: string, opts: NormalizedQwikPluginOptions, - foundQrls: Map, path: Path, sys: OptimizerSystem ): SymbolMapperFn { @@ -55,13 +54,7 @@ function createSymbolMapper( const hash = getSymbolHash(symbolName); if (!parent) { console.warn( - `qwik vite-dev-server symbolMapper: parent not provided for ${symbolName}, falling back to foundQrls.` - ); - parent = foundQrls.get(hash); - } - if (!parent) { - console.warn( - `qwik vite-dev-server symbolMapper: ${symbolName} not in foundQrls, falling back to mapper.` + `qwik vite-dev-server symbolMapper: parent not provided for ${symbolName}, falling back to mapper.` ); const chunk = mapper && mapper[hash]; if (chunk) { @@ -110,10 +103,9 @@ export async function configureDevServer( path: Path, isClientDevOnly: boolean, clientDevInput: string | undefined, - foundQrls: Map, devSsrServer: boolean ) { - symbolMapper = lazySymbolMapper = createSymbolMapper(base, opts, foundQrls, path, sys); + symbolMapper = lazySymbolMapper = createSymbolMapper(base, opts, path, sys); if (!devSsrServer) { // we just needed the symbolMapper return; diff --git a/packages/qwik/src/optimizer/src/plugins/vite.ts b/packages/qwik/src/optimizer/src/plugins/vite.ts index 9504e697575d..a3eae8a8ab15 100644 --- a/packages/qwik/src/optimizer/src/plugins/vite.ts +++ b/packages/qwik/src/optimizer/src/plugins/vite.ts @@ -694,7 +694,6 @@ export function qwikVite(qwikViteOpts: QwikVitePluginOptions = {}): any { path, isClientDevOnly, clientDevInput, - qwikPlugin.foundQrls, devSsrServer ); };