Skip to content

Commit

Permalink
fix: unique imports in #nitro-internal-virtual/server-handlers-meta
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerxZ committed Dec 17, 2024
1 parent f982f99 commit 24b7d17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rollup/plugins/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ ${handlers
},
"#nitro-internal-virtual/server-handlers-meta": () => {
const handlers = getHandlers();
const imports = unique(handlers.map((h) => h.handler));
return /* js */ `
${handlers
${imports
.map(
(h) => `import ${getImportId(h.handler)}Meta from "${h.handler}?meta";`
(handler) => `import ${getImportId(handler)}Meta from "${handler}?meta";`
)
.join("\n")}
export const handlersMeta = [
Expand Down

0 comments on commit 24b7d17

Please sign in to comment.