Skip to content

Commit

Permalink
new approach
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadim Ritter committed Aug 28, 2024
1 parent 493688f commit 0b54223
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions client/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,15 @@ export default ({ mode }) => {
//@ts-ignore
// base: (import.meta.env.VITE_BASE_PATH || "") + "/",

experimental:{
// renderBuiltUrl(filename: string, { hostType }: { hostType: 'js' | 'css' | 'html' }) {
// if (['js', 'css'].includes(hostType)) {
// return { runtime: `window.__getFile(${JSON.stringify(filename)})` }
// } else {
// return { relative: true }
// }
// },

renderBuiltUrl(filename: string, { type }: { type: "public" | "asset" }) {
if (type === "asset") {
return `${filename}`;
}
return filename;
},

},
experimental: {
renderBuiltUrl(filename: string, { hostType }: { hostType: 'js' | 'css' | 'html' }) {
if (['js', 'css'].includes(hostType)) {
return { runtime: `window.__getFile(${JSON.stringify(filename)})` }
} else {
return { relative: true }
}
}
},


define: {
Expand Down

0 comments on commit 0b54223

Please sign in to comment.