This PR attempts to detect simple postcss setups: These are setups that do not load dynamic modules and are based off the examples we are [recommending in our docs](https://tailwindcss.com/docs/installation/using-postcss). We detect wether a config is appropriate by having it use the object plugin config and by not requiring any other modules: ```js module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, }, } ``` When we find such a config file, we will go over it line-by-line and attempt to: - Upgrade `tailwindcss:` to `'@tailwindcss/postcss':` - Remove `autoprefixer` if used We then attempt to install and remove the respective npm packages based on the package manger we detect. And since we now have logic to upgrade packages, this also makes sure to install `tailwindcss@next` at the end of a sucessful migration. --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com> |
||
|---|---|---|
| .. | ||
| @tailwindcss-cli | ||
| @tailwindcss-node | ||
| @tailwindcss-postcss | ||
| @tailwindcss-standalone | ||
| @tailwindcss-upgrade | ||
| @tailwindcss-vite | ||
| internal-example-plugin | ||
| tailwindcss | ||
| tsconfig.base.json | ||