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

Postcss config has deprecated syntax #5175

Closed
7 tasks done
Alexufo opened this issue Oct 2, 2021 · 2 comments
Closed
7 tasks done

Postcss config has deprecated syntax #5175

Alexufo opened this issue Oct 2, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation feat: css pending triage

Comments

@Alexufo
Copy link

Alexufo commented Oct 2, 2021

Describe the bug

https://vitejs.dev/guide/features.html#postcss

vite support postcss.config.js with outdated syntax

  plugins: {
    // Plugins for PostCSS
    "postcss-short": { prefix: "x" },
    "postcss-preset-env": {},
  },

New syntax

    plugins: [
      // Plugins for PostCSS
      ["postcss-short", { prefix: "x" }],
      "postcss-preset-env",
    ],

from here https://webpack.js.org/loaders/postcss-loader/

proof postcss/postcss-load-config#224

Reproduction

new syntax not support in Vite

    plugins: [
      // Plugins for PostCSS
      ["postcss-short", { prefix: "x" }],
      "postcss-preset-env",
    ],

System Info

win10, vite 2.6.0

Used Package Manager

npm

Logs

No response

Validations

@bluwy
Copy link
Member

bluwy commented Mar 20, 2022

@Alexufo I'm confused about what to take action here. Are there code/documentation to update?

new syntax not support in Vite

In what way Vite isn't supporting it? Vite uses postcss-load-config to load the postcss config.

@bluwy
Copy link
Member

bluwy commented Apr 12, 2022

If the object format is outdated, it should be logged by postcss-load-config instead. Currently it's still supported there, which normalizes the output into an array of plugins for Vite to use, so it would be hard to know if the syntax is outdated either. Closing as there hasn't been any response too.

@bluwy bluwy closed this as completed Apr 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation feat: css pending triage
Projects
None yet
Development

No branches or pull requests

3 participants