Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<title>ComfyUI</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="materialdesignicons.min.css" />
<link rel="stylesheet" type="text/css" href="user.css" />
<link rel="stylesheet" type="text/css" href="api/userdata/user.css" />

<!-- Fullscreen mode on mobile browsers -->
<meta name="mobile-web-app-capable" content="yes">
Expand Down
33 changes: 33 additions & 0 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,39 @@ export default defineConfig({
tailwindcss(),
typegpuPlugin({}),
comfyAPIPlugin(IS_DEV),
// Inject legacy user stylesheet links for desktop/localhost only
{
name: 'inject-user-stylesheet-links',
enforce: 'post',
transformIndexHtml(html) {
if (DISTRIBUTION === 'cloud') return html

return {
html,
tags: [
{
tag: 'link',
attrs: {
rel: 'stylesheet',
type: 'text/css',
href: 'user.css'
},
injectTo: 'head-prepend'
},
{
tag: 'link',
attrs: {
rel: 'stylesheet',
type: 'text/css',
href: 'api/userdata/user.css'
},
injectTo: 'head-prepend'
}
]
}
}
},

// Twitter/Open Graph meta tags plugin (cloud distribution only)
{
name: 'inject-twitter-meta',
Expand Down