Skip to content

Commit

Permalink
Merge pull request #2148 from embroider-build/fix-side-watch-export
Browse files Browse the repository at this point in the history
Fix broken default export when required from CJS
  • Loading branch information
ef4 authored Oct 9, 2024
2 parents 6a6d374 + c08ce3f commit ca5f8f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/broccoli-side-watch/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface SideWatchOptions {
dependencies that you're actively developing. For example, right now
@embroider/webpack doesn't rebuild itself when non-ember libraries change.
*/
export default function sideWatch(actualTree: InputNode, opts: SideWatchOptions = {}) {
function sideWatch(actualTree: InputNode, opts: SideWatchOptions = {}) {
const cwd = opts.cwd ?? process.cwd();

if (!opts.watching || !Array.isArray(opts.watching)) {
Expand Down Expand Up @@ -65,3 +65,6 @@ export default function sideWatch(actualTree: InputNode, opts: SideWatchOptions
}),
]);
}

// We expose this as CJS, so make sure this transpiles to module.exports = sideWatch
export = sideWatch;

0 comments on commit ca5f8f7

Please sign in to comment.