Skip to content

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Dec 26, 2024

Description

This PR

  • makes lightningcss warnings to be output (4182001)
  • adds [postcss] to warnings from postcss like we do for errors (c5b73af)
  • adds code frames for warnings / errors that happened when minifying with lightningcss (2fd6db0)
[vite:css][lightningcss] The @nest rule is deprecated
17 |    *foo: bar;
18 |  
19 |    @nest &.bar {
   |         ^
20 |      .bar {
21 |  
error during build:
[vite:css-post] [lightningcss minify] Unexpected token Semicolon

31 |  }
32 |  foo {
33 |    ,: ;
   |       ^
34 |  }
35 |  ._apply-color_1l6gn_1 {

@sapphi-red sapphi-red added feat: css p2-nice-to-have Not breaking anything but nice to have (priority) labels Dec 26, 2024
@sapphi-red sapphi-red merged commit b07c036 into vitejs:main Dec 27, 2024
18 checks passed
@sapphi-red sapphi-red deleted the feat/show-lightningcss-warnings branch December 27, 2024 03:29
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Jan 3, 2025
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | vite    | 6.0.6 | 6.0.7 |


## [v6.0.7](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small607-2025-01-02-small)

-   fix: fix `minify` when `builder.sharedPlugins: true` ([#19025](vitejs/vite#19025)) ([f7b1964](vitejs/vite@f7b1964)), closes [#19025](vitejs/vite#19025)
-   fix: skip the plugin if it has been called before with the same id and importer ([#19016](vitejs/vite#19016)) ([b178c90](vitejs/vite@b178c90)), closes [#19016](vitejs/vite#19016)
-   fix(html): error while removing `vite-ignore` attribute for inline script ([#19062](vitejs/vite#19062)) ([a492253](vitejs/vite@a492253)), closes [#19062](vitejs/vite#19062)
-   fix(ssr): fix semicolon injection by ssr transform ([#19097](vitejs/vite#19097)) ([1c102d5](vitejs/vite@1c102d5)), closes [#19097](vitejs/vite#19097)
-   perf: skip globbing for static path in warmup ([#19107](vitejs/vite#19107)) ([677508b](vitejs/vite@677508b)), closes [#19107](vitejs/vite#19107)
-   feat(css): show lightningcss warnings ([#19076](vitejs/vite#19076)) ([b07c036](vitejs/vite@b07c036)), closes [#19076](vitejs/vite#19076)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Jan 4, 2025
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | vite    | 6.0.6 | 6.0.7 |


## [v6.0.7](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small607-2025-01-02-small)

-   fix: fix `minify` when `builder.sharedPlugins: true` ([#19025](vitejs/vite#19025)) ([f7b1964](vitejs/vite@f7b1964)), closes [#19025](vitejs/vite#19025)
-   fix: skip the plugin if it has been called before with the same id and importer ([#19016](vitejs/vite#19016)) ([b178c90](vitejs/vite@b178c90)), closes [#19016](vitejs/vite#19016)
-   fix(html): error while removing `vite-ignore` attribute for inline script ([#19062](vitejs/vite#19062)) ([a492253](vitejs/vite@a492253)), closes [#19062](vitejs/vite#19062)
-   fix(ssr): fix semicolon injection by ssr transform ([#19097](vitejs/vite#19097)) ([1c102d5](vitejs/vite@1c102d5)), closes [#19097](vitejs/vite#19097)
-   perf: skip globbing for static path in warmup ([#19107](vitejs/vite#19107)) ([677508b](vitejs/vite@677508b)), closes [#19107](vitejs/vite#19107)
-   feat(css): show lightningcss warnings ([#19076](vitejs/vite#19076)) ([b07c036](vitejs/vite@b07c036)), closes [#19076](vitejs/vite#19076)
@mattpilott
Copy link

mattpilott commented Jan 4, 2025

@sapphi-red How can these be disabled?

@sapphi-red
Copy link
Member Author

sapphi-red commented Jan 5, 2025

@mattpilott You can filter them out by the customLogger option.
https://vite.dev/config/shared-options.html#customlogger

renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Jan 5, 2025
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | vite    | 6.0.6 | 6.0.7 |


## [v6.0.7](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small607-2025-01-02-small)

-   fix: fix `minify` when `builder.sharedPlugins: true` ([#19025](vitejs/vite#19025)) ([f7b1964](vitejs/vite@f7b1964)), closes [#19025](vitejs/vite#19025)
-   fix: skip the plugin if it has been called before with the same id and importer ([#19016](vitejs/vite#19016)) ([b178c90](vitejs/vite@b178c90)), closes [#19016](vitejs/vite#19016)
-   fix(html): error while removing `vite-ignore` attribute for inline script ([#19062](vitejs/vite#19062)) ([a492253](vitejs/vite@a492253)), closes [#19062](vitejs/vite#19062)
-   fix(ssr): fix semicolon injection by ssr transform ([#19097](vitejs/vite#19097)) ([1c102d5](vitejs/vite@1c102d5)), closes [#19097](vitejs/vite#19097)
-   perf: skip globbing for static path in warmup ([#19107](vitejs/vite#19107)) ([677508b](vitejs/vite@677508b)), closes [#19107](vitejs/vite#19107)
-   feat(css): show lightningcss warnings ([#19076](vitejs/vite#19076)) ([b07c036](vitejs/vite@b07c036)), closes [#19076](vitejs/vite#19076)
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
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.

3 participants