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

fix: respect build plugins changing build.publish #6133

Merged
merged 5 commits into from
Nov 9, 2023

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented Nov 8, 2023

While working on netlify/angular-runtime#67, I noticed we're not respecting build plugins changing build.publish. We should! This PR fixes that.

@Skn0tt Skn0tt self-assigned this Nov 8, 2023
@Skn0tt Skn0tt requested a review from a team as a code owner November 8, 2023 10:29
Copy link

github-actions bot commented Nov 8, 2023

📊 Benchmark results

Comparing with 2df97c3

  • Dependency count: 1,427 (no change)
  • Package size: 443 MB ⬇️ 0.00% decrease vs. 2df97c3

@@ -123,6 +123,7 @@ export const runNetlifyBuild = async ({ command, env = {}, options, settings, ti
await devCommand({
command: undefined,
useStaticServer: true,
dist: options.dir ? undefined : netlifyConfig?.build?.publish,
Copy link
Member

Choose a reason for hiding this comment

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

Hmm this feels a bit odd. Is it because options.dir takes precedence and devCommand will find it on its own? If so, would it make sense to always send dist but make it prefer options.dir over netlifyConfig?.build?.publish?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree it feels odd. But, always sending dist will effectively override all settings that come out of detectServerSettings, so i'd prefer not to do that.
Now that I think about it, undefined will also override dist because it's being destructured in devCommand - gonna need to change this.

@Skn0tt Skn0tt enabled auto-merge (squash) November 9, 2023 08:59
@Skn0tt Skn0tt merged commit 7f5c989 into main Nov 9, 2023
35 checks passed
@Skn0tt Skn0tt deleted the respect-build-plugin-publish-change branch November 9, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants