Skip to content

feat(css): use esbuild.log* options when minifying (fixes #9196)#9210

Merged
patak-dev merged 1 commit intovitejs:mainfrom
sapphi-red:feat/css-minify-warning-suppress
Jul 19, 2022
Merged

feat(css): use esbuild.log* options when minifying (fixes #9196)#9210
patak-dev merged 1 commit intovitejs:mainfrom
sapphi-red:feat/css-minify-warning-suppress

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Jul 19, 2022

Description

There is currently no way to suppress warnings during minifying CSS.
This PR makes esbuild.logLevel, esbuild.logLimit, esbuild.logOverride applied when minifying CSS.

With this PR, the warning shown at #9196 could be suppressed with the config below.

export default {
  esbuild: {
    logOverride: {
      'unsupported-css-property': 'silent'
    }
  }
}

fixes #9196

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 feat: css p2-nice-to-have Not breaking anything but nice to have (priority) labels Jul 19, 2022
@patak-dev patak-dev merged commit 88baa53 into vitejs:main Jul 19, 2022
@sapphi-red sapphi-red deleted the feat/css-minify-warning-suppress branch July 19, 2022 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: css p2-nice-to-have Not breaking anything but nice to have (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suppress warning during rendering chunks

3 participants