diff --git a/packages/waku/src/lib/builder/build.ts b/packages/waku/src/lib/builder/build.ts index e085586cb..134791b05 100644 --- a/packages/waku/src/lib/builder/build.ts +++ b/packages/waku/src/lib/builder/build.ts @@ -514,7 +514,10 @@ const emitHtmlFiles = async ( let htmlHead = publicIndexHtmlHead; if (cssAssets.length) { const cssStr = cssAssets - .map((asset) => ``) + .map( + (asset) => + ``, + ) .join('\n'); // HACK is this too naive to inject style code? htmlStr = htmlStr.replace(/<\/head>/, cssStr); diff --git a/packages/waku/src/lib/plugins/vite-plugin-rsc-index.ts b/packages/waku/src/lib/plugins/vite-plugin-rsc-index.ts index 8ab0169e7..7fce336d6 100644 --- a/packages/waku/src/lib/plugins/vite-plugin-rsc-index.ts +++ b/packages/waku/src/lib/plugins/vite-plugin-rsc-index.ts @@ -79,9 +79,6 @@ ${opts.htmlHead} }, transformIndexHtml() { return [ - // HACK without , some relative assets don't work. - // FIXME ideally, we should avoid this. - { tag: 'base', attrs: { href: opts.basePath } }, { tag: 'script', attrs: { type: 'module', async: true }, @@ -89,7 +86,7 @@ ${opts.htmlHead} }, ...(opts.cssAssets || []).map((href) => ({ tag: 'link', - attrs: { rel: 'stylesheet', href }, + attrs: { rel: 'stylesheet', href: `${opts.basePath}${href}` }, injectTo: 'head' as const, })), ];