diff --git a/.changeset/deep-bushes-live.md b/.changeset/deep-bushes-live.md new file mode 100644 index 00000000000..dd77ff86f5a --- /dev/null +++ b/.changeset/deep-bushes-live.md @@ -0,0 +1,5 @@ +--- +'@builder.io/qwik-city': minor +--- + +remove double assetsDir on bundle close of staticPaths diff --git a/packages/qwik-city/src/adapters/shared/vite/post-build.ts b/packages/qwik-city/src/adapters/shared/vite/post-build.ts index 8ce44d6d58a..f805401d96f 100644 --- a/packages/qwik-city/src/adapters/shared/vite/post-build.ts +++ b/packages/qwik-city/src/adapters/shared/vite/post-build.ts @@ -48,13 +48,13 @@ export async function postBuild( } }; - const loadDir = async (fsDir: string, pathname: string) => { + const loadDir = async (fsDir: string, pathname = '') => { const itemNames = await fs.promises.readdir(fsDir); await Promise.all(itemNames.map((i) => loadItem(fsDir, i, pathname))); }; if (fs.existsSync(clientOutDir)) { - await loadDir(clientOutDir, pathName); + await loadDir(clientOutDir); } const notFoundPathsCode = createNotFoundPathsModule(pathName, notFounds, format);