Skip to content

Commit 488f9aa

Browse files
Merge pull request #56554 from nextcloud/fix/build-vite-chunks
build: correct render build url in Vite for chunks/assets in dist
2 parents 76d878e + d54009f commit 488f9aa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build/frontend/vite.config.mts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,15 @@ export default createAppConfig(Object.fromEntries(viteModuleEntries), {
8989
},
9090
},
9191
},
92+
experimental: {
93+
renderBuiltUrl(filename, { hostType }) {
94+
if (hostType === 'css') {
95+
return `./${filename}`
96+
}
97+
return {
98+
runtime: `window.OC.filePath('', '', 'dist/${filename}')`,
99+
}
100+
},
101+
},
92102
},
93103
})

0 commit comments

Comments
 (0)