Skip to content

Commit

Permalink
fix(qwik): Incorrect module reference in inlinedQrl
Browse files Browse the repository at this point in the history
Fix #5368
  • Loading branch information
mhevery committed Oct 31, 2023
1 parent e02feda commit 99be78e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/qwik/src/optimizer/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ export function createPlugin(optimizerOptions: OptimizerOptions = {}) {
}
const deps = new Set<string>();
for (const mod of newOutput.modules) {
if (mod.isEntry) {
if (mod.isEntry || mod.hook) {
const key = normalizePath(path.join(srcDir, mod.path));
currentOutputs.set(key, [mod, id]);
deps.add(key);
Expand Down Expand Up @@ -669,7 +669,7 @@ export function createPlugin(optimizerOptions: OptimizerOptions = {}) {

results.set(normalizedID, clientNewOutput);
for (const mod of clientNewOutput.modules) {
if (mod.isEntry) {
if (mod.isEntry || mod.hook) {
const key = normalizePath(path.join(srcDir, mod.path));
ctx.addWatchFile(key);
transformedOutputs.set(key, [mod, id]);
Expand All @@ -686,7 +686,7 @@ export function createPlugin(optimizerOptions: OptimizerOptions = {}) {
await ctx.load({ id });
}

const module = newOutput.modules.find((m) => !m.isEntry)!;
const module = newOutput.modules.find((m) => !m.isEntry && m.hook == null)!;
return {
code: module.code,
map: module.map,
Expand Down

0 comments on commit 99be78e

Please sign in to comment.