Skip to content

Commit

Permalink
fix(bundling): rollup watch mode yields result from async iterable (#…
Browse files Browse the repository at this point in the history
…26160)

This PR fixes the return from `@nx/rollup:rollup` executor so that it
yields results from the inner async iterable.

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit 012ce7c)
  • Loading branch information
jaysoo authored and FrozenPandaz committed May 28, 2024
1 parent c5cc056 commit eda994f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rollup/src/executors/rollup/rollup.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export async function* rollupExecutor(

if (options.watch) {
// region Watch build
return createAsyncIterable(({ next }) => {
return yield* createAsyncIterable(({ next }) => {
const watcher = rollup.watch(rollupOptions);
watcher.on('event', (data) => {
if (data.code === 'START') {
Expand Down

0 comments on commit eda994f

Please sign in to comment.