-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Project on vue-cli with postcss-normalize doesn't work properly #4238
Comments
Please provide an runnable reproduction. |
From your description it seems the plugin conflicts with SFCs Putting it into its own style tag works as you say. Why is that not an ok solution ? |
It's not ok solution because we have several ways for using postcss-normalize and just one works. It's not clear and even took me a lot of time for resolving this. I guess it real conflicts with 'scoped' but I can't figure out a perfect universal way for resolving this. |
What do you mean in 'runnable reproduction'? I provided link to my git where I tested this behaviour. Could you give me more details about this? |
You wrote that the git was "fixed" so it doesn't have the bug/problem, so I assumed I can't use it as a reproducfion of the described issue. If it it does ahownthe problem when I clo e and run the repository it's fine. However about my second comment: if you want non-scoped css, don't put your import into a style block that has a Put it into a second style block, or into a case file that you import into main.js |
Ok. I will provide runnable git link for this issue as soon as possible. But there is no 'scope' attributes at all... That's why I worry about such weird behaviour from postcss and default vue cli project. Putting the 'normalize css block' into main.js doesn't resolve this issue and contains the same bug: css result contains 'scoped' results from postcss-normalize and css-normalize is placed only after style-block from the App.vue. |
|
I found: this is bug webpack & postcss. The same behavior when we import 2 CSS files into main.js (without any vue-loaders etc.). I'm going to report this to the postcss-team. |
The bug is reported: csstools/postcss-normalize#44 |
Version
3.8.4
Reproduction link
https://github.com/Yegorich555/FromScratch_VueJs/tree/feature/vuejs-cli/cli_test
The upper link contains a fixed (working) version. But below some explanations of the issue
Environment info
Steps to reproduce
What is expected?
What is actually happening?
Removing any styles from App.vue fixes this issue - but it's not ok.
Using manual imports in main.js doesn't fix this issue - it's also wrong because the first line with 'import css' should be at first before others styles (after compilation)
Using of an additional style-block with
(before any other style-blocks in App.vue) and removing forceImport from postcss.config.js
fixes this problem. But it's not ok.
The text was updated successfully, but these errors were encountered: