Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/wxt/e2e/tests/typescript-project.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ describe('TypeScript Project', () => {

declare module "wxt/browser" {
export type PublicPath =
| "/"
| "/options.html"
| "/popup.html"
| "/sandbox.html"
| "/"
| ""
type HtmlPublicPath = Extract<PublicPath, \`\${string}.html\`>
export interface WxtRuntime {
getURL(path: PublicPath): string;
Expand Down
3 changes: 2 additions & 1 deletion packages/wxt/src/core/generate-wxt-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ async function getPathsDeclarationEntry(
isHtmlEntrypoint(entry) ? '.html' : '.js',
),
)
.concat([''])
.concat(await getPublicFiles());

await wxt.hooks.callHook('prepare:publicPaths', wxt, paths);
Expand All @@ -82,6 +81,8 @@ async function getPathsDeclarationEntry(
.map(normalizePath)
.sort()
.map((path) => ` | "/${path}"`)
.concat(` | "/"`)
.concat(` | ""`)
.join('\n');

const template = `// Generated by wxt
Expand Down