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

add basic watch file support #2105

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/src/virtual-entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function renderEntrypoint(

return {
src: entryTemplate(params),
watches: [],
watches: ['app/**/*'],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried this locally and it seems to be all we need to get it working 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another place where we need to be doing things as in d850898

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of hard-coding the string "app".

};
}

Expand Down Expand Up @@ -330,7 +330,7 @@ function shouldSplitRoute(routeName: string, splitAtRoutes: (RegExp | string)[]

export function getAppFiles(appRoot: string): Set<string> {
const files: string[] = walkSync(appRoot, {
ignore: ['_babel_filter_.js', 'app.js', 'assets', 'testem.js', 'node_modules'],
directories: false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the ignore because we now target the app folder as our appRoot so we don't need these ignores, and I added directories false because we only care about files 😂

});
return new Set(files);
}
Expand Down
Loading