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

Provide hook functions related to pre-build for plug-in development #3094

Closed
xiankq opened this issue Apr 22, 2021 · 1 comment
Closed

Provide hook functions related to pre-build for plug-in development #3094

xiankq opened this issue Apr 22, 2021 · 1 comment

Comments

@xiankq
Copy link

xiankq commented Apr 22, 2021

Clear and concise description of the problem

I want to provide related hook functions during pre-build scan to facilitate full compilation of the project

Suggested solution

There are many projects with front-end framework features that do not run in the browser, such as taroJS or uni-app applet-related front-end projects. The feature of this type of project is that all codes need to be compiled into specific files when they are first built.
Vite uses relevant browser features to achieve the effect of compiling after the request. Obviously, this kind of project cannot simulate the browser request, so I must scan the project and compile the full amount when Vite starts.
I found that vite provides the option of build --watch, but this does not have any advantage over webpack in terms of speed. I try to customize the scan with other tools, but this is equivalent to two pre-build scans.
So I hope that vite provides related hook functions during pre-build scan, so that the plug-in can choose whether to use esbuild for the full build when vite starts

@bluwy
Copy link
Member

bluwy commented Mar 6, 2022

I'm not really sure what this feature request is asking. Do you want to pre-build certain files before the scan? Perhaps #6801 could work. I'd be keen to understand if you can elaborate with some examples.

@bluwy bluwy closed this as completed Mar 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants