-
Notifications
You must be signed in to change notification settings - Fork 922
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
[Bug report]: build with vite mode parallel with cause error #1250
Comments
I do think you need to provide detailed inforamation about what our problem is, at least the issue is now thrown at your plugin. You may need to explain clearly:
|
@Mister-Hope Thanks for you feedback. I will update error message |
Sorry for the waitting. From the error info. I judged that the error occurred in the generatorBundle stage. Becasue currently. vuepress internal build logic is parallel. But it will casue rollup bundle context loose right hash assets file |
This comment was marked as off-topic.
This comment was marked as off-topic.
I got what the issue is. Here we are generating 2 config: But we are sharing same plugin instance across client/server in build process. @meteorlxy |
Yes. You are right.It will cause concurrent. |
I think we should generator two difference app instance? Or build config? |
parallel build won't cause error ( My mistake |
I am not familiar with vite, but if you do think that 2 plugin instance is required to fix this, then a breaking change must be made at api, we shall use a callable function for bundler: - bundler: viteBundler({
- // vite bundler config
- })
+ bundler: () => viteBundler({
+ // vite bundler config
+ }) |
Sounds bad. That will be a break change : ( |
I look Currently, Us build config across client/server in build process. But will change the process of rollup generating hash. See rollup By the way. rollup I think there two way to sovle.
|
This is definitely not our consideration, our build time is already long enough, and our primary goal is to improve speed |
Closing as this has been stale for a long time. Vite version and VuePress version has updated a lot. Feel free to open a new issue with the latest version & context if it's still a problem |
I don't think this is should be resolved. A lot of plugins can not work in multiple instance. Running successfully in multiple instance Means plugin cannot have any local state outside any hooks, But as plugins are designed callable, they should be allowed to have such things. |
This should be a valid fix, but this is a breaking change. @meteorlxy |
Suggest remaining it open |
Description
Background
Maybe it's look likes a bug. Refer nonzzz/vite-plugin-compression#18
I try to change vuepress it's vite build logic ( from parallel to serial. It works well
Form rollup/rollup#3506 i think we shouldn't parallel run
vite build
:)Reproduction
https://github.com/u2sb/www.u2sb.com/tree/vite-compression-plugin
Used Package Manager
pnpm
System Info
The text was updated successfully, but these errors were encountered: