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

refactor(compiler-sfc): bump postcss to version 8 #2649

Closed
wants to merge 10 commits into from
Closed

refactor(compiler-sfc): bump postcss to version 8 #2649

wants to merge 10 commits into from

Conversation

lstoeferle
Copy link

@lstoeferle lstoeferle commented Nov 20, 2020

Since tailwindcss v2 is available, it would be great to be able to use it in Vue applications. Unfortunately it requires postcss v8+. I hope I did not break the plugins while adapting the new postcss api...

fix #2642

@posva posva changed the title Bump postcss to version 8+ (fix #2642) refactor: bump postcss to version 8 Nov 20, 2020
@posva posva changed the title refactor: bump postcss to version 8 refactor(compiler-sfc): bump postcss to version 8 Nov 20, 2020
@edison1105
Copy link
Member

I am also working on #2642.😭
I read this postcss8 migration article.

should we move PostCSS 8 to peerDependencies and set module.exports.postcss = true ?

@lstoeferle
Copy link
Author

lstoeferle commented Nov 20, 2020

@edison1105 It seems like moving to peerDependencies does not work properly. I'll move it back to devDependencies later while keeping the module.exports.postcss = true

packages/compiler-sfc/src/stylePluginTrim.ts Outdated Show resolved Hide resolved
@edison1105
Copy link
Member

edison1105 commented Nov 20, 2020

@edison1105 It seems like moving to peerDependencies does not work properly. I'll move it back to devDependencies later while keeping the module.exports.postcss = true

both in peerDependencies and devDependencies.

  "peerDependencies": {
    ...
    "postcss": "^8.1.8"
  },
"devDependencies": {
	...
    "postcss": "^8.1.8",
  }

I'm not sure whether to do this.

@lstoeferle
Copy link
Author

I'm not sure whether to do this.

I'm not sure if it makes sense adding it to both 🤔

@edison1105
Copy link
Member

I'm not sure whether to do this.

I'm not sure if it makes sense adding it to both 🤔

The purpose of the two dependencies is different. In theory it is needed.

@lstoeferle
Copy link
Author

lstoeferle commented Nov 20, 2020

Okay thanks for the hint 👍 I'll add it quickly to peerDependencies again. Actually it's not devDependencies 🤦 Sorry for confusion 🙃

@edison1105
Copy link
Member

Okay thanks for the hint 👍 I'll add it quickly to peerDependencies again. Actually it's not devDependencies 🤦 Sorry for confusion 🙃

If postcss add to dependencies, there is no need to add it to peerDependencies.
add it to both devDependencies and peerDependencies and then it makes sense.

If my understanding is wrong, please correct me.

@ludofischer
Copy link

Notice that currently postcss-modules still depends on PostCSS 7, so with this change installing the Vue compiler will install PostCSS 8 AND 7, unless postcss-modules is ported first.

@songololo
Copy link

songololo commented Nov 26, 2020

For those waiting for official v8 support for the purpose of tailwindcss, an FYI that v2 of tailwind currently has a bridging compatibility version per tailwindcss@compat, useful until above issues are resolved...

@posva
Copy link
Member

posva commented Nov 26, 2020

@songololo I unlocked so you can post it 🙂 Thanks!

@yyx990803
Copy link
Member

This seems to be based off incomplete work I was doing in the postcss-8 branch... note I was waiting on postcss-modules's new release before completing the refactor, and there was a reason why I'm not merging that branch. We also need to coordinate w/ @vue/cli before release.

See #2710

@yyx990803 yyx990803 closed this Dec 2, 2020
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.

Upgrade @vue/compiler-sfc to PostCSS 8
7 participants