Skip to content

Commit d54009f

Browse files
committed
build: correct renderBuildUrl in Vite for chunks/assets in dist
Signed-off-by: Grigorii K. Shartsev <[email protected]>
1 parent d400b38 commit d54009f

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)