-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No loader is configured for ".html" files #9932
Comments
anyone?👀 |
I think this is working as intended – dependencies should be shipped as valid JS code and JS doesn't allow HTML imports. So this needs to be fixed on the side of the dependency by removing the HTML import or bundling it into valid JavaScript before shipping to npm. Which dependency is causing this? (in the repro you're adding |
It's not an open source package, so it may not be standard enough. Since I couldn't import it in the repro, I used optimizeDeps to simulate this error. |
Yeah this is working as intended per @jonaskuske. Vite doesn't support importing HTML in dependency prebundling, adding the library to |
Describe the bug
During dependency pre-bundling, if there is a dependency which imports html files, esbuild would report an error:
Reproduction
https://stackblitz.com/edit/vitejs-vite-b7dx3h?file=vite.config.js,test.html,index.html,public%2Fmain.js&terminal=dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: