cli icon indicating copy to clipboard operation
cli copied to clipboard

Warn when running `deploy` without build if using build plugin that modifies config

Open ascorbic opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently, if a use runs netlify build and then netlify deploy, any config changes made by a build plugin are lost because they are not persisted. This can be confusing. e.g. https://github.com/netlify/netlify-plugin-nextjs/issues/953

Describe the solution you'd like

The ideal would be if the config were persisted, so if build had been run then it would save the normalised config in .netlify, and if the other config was unchanged then it would deploy that instead. However if that isn't possible it would be good to add a warning if deploying after a build in which the config has been mutated, suggesting that the user run netlify deploy --build instead.

Describe alternatives you've considered

Add the same check in the build plugin itself.

Can you submit a pull request?

I can do this is if we think it's a good approach

ascorbic avatar Dec 12 '21 07:12 ascorbic