-
Notifications
You must be signed in to change notification settings - Fork 357
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: use heuristics for build and deploy command as well #6729
fix: use heuristics for build and deploy command as well #6729
Conversation
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'd be nice to have some tests, but LGTM.
bbfecbe
to
0265b47
Compare
0265b47
to
6b2077b
Compare
…-build-and-deploy-as-well
…-build-and-deploy-as-well
…-build-and-deploy-as-well
…-build-and-deploy-as-well
…-build-and-deploy-as-well
src/utils/build-info.ts
Outdated
/** | ||
* Merges the settings from the heuristics with the cached config. | ||
* Returns the updated cached config | ||
* @param cachedConfig The cached config |
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.
I think this needs updating, since I don't see this param?
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.
oh good catch!
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.
fixed here: 049f4a9
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.
🚀
@eduardoboucas I'm going to add an integration test to it as well :) |
This is great! Should it be working for |
Is there a way to overwrite or turn off this heuristic framework detection for the build and deploy commands? This new behavior breaks our current monorepo setup, because we have both Next.js and Vite based React apps in it, and the heuristic detects next as the framework, even for the Vite based React app. The |
🎉 Thanks for submitting a pull request! 🎉
Summary
Depends on: netlify/build#5735
Fixes https://linear.app/netlify/issue/CPLA-738/sites-created-in-the-cli-should-use-framework-detection
Run the framework detection before
ntl build
andntl deploy --build
as well to not need anetlify.toml
in simple cases. (ntl dev
already supported this)For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)