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

fix(build): prevent create file watcher in production mode #1598

Closed
wants to merge 7 commits into from

Conversation

fu050409
Copy link
Member

Description:

  • Prevent create file watcher in production mode

Resolved: #1597

Copy link

changeset-bot bot commented Jul 11, 2024

🦋 Changeset detected

Latest commit: 0ea76ca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farmfe/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@fu050409 fu050409 changed the title Fix/build watch fix(build): prevent create file watcher in production mode Jul 11, 2024
@fu050409 fu050409 requested a review from ErKeLost July 12, 2024 02:39
@fu050409 fu050409 requested a review from wre232114 July 19, 2024 01:20
@shulandmimi
Copy link
Member

#1597 watch is only enabled, but the options are not used

Currently, the watch configuration is not used anywhere. if it is not to supplement the watch configuration, then the changes here are meaningless.

@fu050409
Copy link
Member Author

fu050409 commented Jul 19, 2024

#1597 watch is only enabled, but the options are not used

Currently, the watch configuration is not used anywhere. if it is not to supplement the watch configuration, then the changes here are meaningless.

This pull request I have submitted is to resolve the fact that the farm build process is blocked during the watch configuration exists. In the integrated environment, configuring the watch option causes the process to fail to continue. You can actually see that the functions wrapped in the code are not reused elsewhere, i.e. only the watch and build command are used. So it looks like we don't have to consider whether the watch configuration exists or not, we just need to determine the current command.

@shulandmimi
Copy link
Member

This pull request I have submitted is to resolve the fact that the farm build process is blocked during the watch configuration exists.

#1597 uses an unfinished/unimplemented feature, so it cannot be considered a bug, and it is not necessary to fix it.

Based on the features you need, you should try to use server.hmr.watchOptions or implement compilation.watch

@fu050409
Copy link
Member Author

This pull request I have submitted is to resolve the fact that the farm build process is blocked during the watch configuration exists.

#1597 uses an unfinished/unimplemented feature, so it cannot be considered a bug, and it is not necessary to fix it.

Based on the features you need, you should try to use server.hmr.watchOptions or implement compilation.watch

Thanks for the description, this looks like a mistake on my part

@fu050409 fu050409 closed this Jul 19, 2024
@shulandmimi
Copy link
Member

Anyway, thanks for your PR. this is a legacy issue. i think it can be optimized and should be explained before it to avoid misleading others. This is our mistake.

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

Successfully merging this pull request may close these issues.

[Bug Report]: farm build nerver return if compilation.watch configured
3 participants