-
Notifications
You must be signed in to change notification settings - Fork 79
feat: add packagePath property for config #5223
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
Conversation
|
This pull request adds or modifies JavaScript ( |
| build: { | ||
| environment: {}, | ||
| publish: '.', | ||
| publish: packagePath || '.', |
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.
This is for Option A inside the Slack discussion: https://netlify.slack.com/archives/C05556LEX28/p1691423437855069
packages/config/src/files.ts
Outdated
| const path = originalPath.replace(LEADING_SLASH_REGEXP, '') | ||
| // TODO: Based on survey outcome: https://netlify.slack.com/archives/C05556LEX28/p1691423437855069 | ||
| // If we like option B then: | ||
| // const pathA = resolve(baseRel, packagePath || '', path) |
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.
This would be Option B in the discussion: https://netlify.slack.com/archives/C05556LEX28/p1691423437855069
eduardoboucas
left a comment
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.
🚀
🎉 Thanks for submitting a pull request! 🎉
Summary
Is part of fixing: https://github.com/netlify/pod-dev-foundations/issues/571
To be able to detect
_headersor_redirectsfor a package when working from the repository root we need an additional field calledpackage_paththis will be set via the site picker on the React UI and persisted on the API.By providing this to netlify config we can still separate the execution root from the location where we store and retrieve the configuration.
The implementation depends on this conversation here: https://netlify.slack.com/archives/C05556LEX28/p1691423437855069
For us to review and ship your PR efficiently, please perform the following steps:
we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
something that`s on fire 🔥 (e.g. incident related), you can skip this step.
your code follows our style guide and passes our tests.
A picture of a cute animal (not mandatory, but encouraged)