-
Notifications
You must be signed in to change notification settings - Fork 401
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(): copy all assets on build #1829
Conversation
}; | ||
|
||
setTimeout(closeFn, timeoutMs); | ||
this.watchers.forEach((watcher) => watcher.close()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.watchers.forEach((watcher) => watcher.close()); | |
this.watchers.forEach((watcher) => watcher.close()); |
AFAIR close()
returns a Promise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the same as before. Is there a problem with that?
@@ -96,6 +78,10 @@ export class AssetsManager { | |||
.on('change', (path: string) => this.actionOnFile({ ...option, path, action: 'change' })) | |||
.on('unlink', (path: string) => this.actionOnFile({ ...option, path, action: 'unlink' })); | |||
|
|||
if (!isWatchEnabled) { | |||
watcher.on('ready', () => watcher.close()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Watcher event listener return type is void, so it will not listen to the promise.
@kamilmysliwiec any updates on this? |
Is there any plan to reimplement this issue? |
Hm, @kamilmysliwiec was there any issue with this fix? |
@greg-md |
@kamilmysliwiec still not fixed in master? |
It introduced a major regression |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #1828
What is the new behavior?
Will copy all the assets configured on build.
Does this PR introduce a breaking change?
Other information