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

feat(remix-dev): add watchPaths config option #3188

Merged
merged 4 commits into from
Jun 30, 2022

Conversation

christophertrudel
Copy link
Contributor

@christophertrudel christophertrudel commented May 13, 2022

Support to watch directories other then remixes default directories. Will help integration with mono repos like NX/TurboRepo.

Closes: #2983
Agreed upon replacement of: #2985

  • [ x ] Docs
  • [ x ] Tests

Testing Strategy:

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 13, 2022

Hi @christophertrudel,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@christophertrudel christophertrudel changed the base branch from main to dev May 13, 2022 19:49
@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 13, 2022

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@MichaelDeBoey MichaelDeBoey changed the title feat(remix-dev): watchDirectories option for remix.config feat(remix-dev): add watchDirectories config option May 13, 2022
@christophertrudel christophertrudel force-pushed the feat/watchDirectories branch 6 times, most recently from dbc3038 to eefdfb4 Compare May 21, 2022 01:18
@jdnichollsc
Copy link

Thanks for your contribution mate!

@ggaulard
Copy link

Thanks for that we really need it :)

@jacob-ebey jacob-ebey changed the title feat(remix-dev): add watchDirectories config option feat(remix-dev): add watchPaths config option Jun 30, 2022
@@ -151,7 +151,10 @@ export interface AppConfig {
/**
* A function for defining custom directories to watch while running `remix dev`, in addition to `appDirectory`.
*/
watchPaths?: () => Promise<string | string[]>;
watchPaths?:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even better!

@jacob-ebey jacob-ebey merged commit bbe8d11 into remix-run:dev Jun 30, 2022
@jacob-ebey
Copy link
Member

Thanks for the contribution @christophertrudel

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2022

🤖 Hello there,

We just published version v0.0.0-nightly-fb3cb3a-20220701 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@ggaulard
Copy link

ggaulard commented Jul 5, 2022

Work has expected
https://github.com/ggaulard/nx-remix-react-native (conf file)
mixing nx, remix and react native to have a common ui component library
(require some npm i --force, waiting react native release to support react 18)

@jdnichollsc
Copy link

Working as expected from my Nx monorepo with RemixJS using libraries, this is my remix.config:

/**
 * @type {import('@remix-run/dev').AppConfig}
 */
module.exports = {
  ignoredRouteFiles: ['**/.*'],
  watchPaths: [
    '../../libs/**/*',
  ],
};

Thanks for your help folks, Remix live-reload is amazing now! <3

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

Successfully merging this pull request may close these issues.

Dev mode is not re building / reloading in monorepo context (nx)
5 participants