-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Can't parse html in dev mode #2815
Comments
From the information you provided, I am not sure what your problem is. Can you give me a reproduction? |
Hello @wyhaya. Please provide a online reproduction by codesandbox or a minimal GitHub repository. Issues labeled by |
@anncwb I just updated the description and uploaded vite-project-example.zip |
@wyhaya I understand what you mean. Currently vite does not support this, it may be supported later. You can view this file |
@anncwb Thank you for your reply. I would like to know why it is normal in build mode? This error seems to be caused by not being able to distinguish between file types, is there a way to explicitly point out that this is an |
I think it may be that the optimizer does not support virtual html files |
There's a comment at #7095 (comment) showing how to create a Vite plugin that handles virtual HTML files. It's not the most ergonomic solution right now, so perhaps this issue can be an enhancement to improve handling HTML files in Vite plugins. |
I think this is a duplicate of #2321 |
Describe the bug
I am writing a plugin to provide virtual html.
yarn dev
When I try to access
/test
in development mode, I get an error.yarn build
It doesn't look like any problem in build mode
Other
And I can't use the .html suffix to access it, or I'll get a 404
Reproduction
vite-project-example.zip
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: yarn
Logs
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: