504 Timeout on some dependencies #396
-
I'm having trouble loading an HTML page in dev mode (the one processed by vite) Example of one such dependency request failure @jacksteamdev I believe creating a reproduction won't be that easy so I wanted to first ask. Do you have any clues about what might cause this? Is this chrome crxjs issue or vite itself? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@filipw01 I have seen this before. I think it's a problem with Dependency Pre-Bundling where Vite doesn't crawl the HTML pages correctly. CRXJS should configure this automatically... not sure if it's a Vite problem or a CRXJS problem. Questions
WorkaroundWhat's worked for me in the past is to configure these dependencies manually using the optimizeDeps options, either {
// ... vite config
optimizeDeps: {
entries: ["src/*.html"],
}
} |
Beta Was this translation helpful? Give feedback.
-
vite 2.9.9
It's in both places to be able to create an iframe with it via content script
The whole resolved config
After workaround changes (
The workaround works great, thank you 🙏 |
Beta Was this translation helpful? Give feedback.
@filipw01 I have seen this before. I think it's a problem with Dependency Pre-Bundling where Vite doesn't crawl the HTML pages correctly. CRXJS should configure this automatically... not sure if it's a Vite problem or a CRXJS problem.
Questions
DEBUG=vite:config vite
?Workaround
What's worked for me in the past is to configure these dependencies manually using the optimizeDeps options, either
entries
orinclude
: