Skip to content
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

Resolve html entry points with plugins #2321

Open
remorses opened this issue Mar 1, 2021 · 2 comments
Open

Resolve html entry points with plugins #2321

remorses opened this issue Mar 1, 2021 · 2 comments

Comments

@remorses
Copy link
Contributor

remorses commented Mar 1, 2021

Is your feature request related to a problem? Please describe.
Currently the build and prebundle steps use globs to find entry points, this is not optimal because globs can be slow on large folders and there is no way to pass virtual html files to vite

Describe the solution you'd like
Use the resolveId and load hooks to resolve html entry files, this would let users load virtual entry points without relying on a glob search

If no entry points are found using plugins, fallback to using a glob search

Frameworks built on top of vite wouldn't need to write a temporary html file and would use a virtual html file instead

Describe alternatives you've considered

Additional context

@IndexXuan
Copy link

this will help vue-cli migrations to vitie more smoothly ~ vite do need html for serve but it is nice to have virtual html entry.

@IndexXuan
Copy link

https://github.com/IndexXuan/vite-plugin-html-template
It works for me. like html-webpack-plugin for vite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants