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: don't modify config #9261

Closed
wants to merge 1 commit into from
Closed

fix: don't modify config #9261

wants to merge 1 commit into from

Conversation

sapphi-red
Copy link
Member

Description

build.terserOptions is specified but build.minify is not set to use Terser. Note Vite now defaults to use esbuild for minification. If you still prefer Terser, set build.minify to "terser".

This warning was shown even if build.terserOptions was not set.
https://github.com/vitejs/vite/runs/7440261696?check_suite_focus=true#step:13:78

This was happening because of Object.assign(config, resolvedConfig). This PR changes that to Object.assign({}, config, resolvedConfig) to avoid modifing config.

refs #9212

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added the bug label Jul 21, 2022
@sapphi-red
Copy link
Member Author

@sapphi-red
Copy link
Member Author

Closing as #9262 supersedes this one.

@sapphi-red sapphi-red closed this Jul 21, 2022
@sapphi-red sapphi-red deleted the fix/dont-modify-config branch July 21, 2022 03:02
@sapphi-red sapphi-red mentioned this pull request Jul 21, 2022
9 tasks
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