-
-
Notifications
You must be signed in to change notification settings - Fork 150
Css parsing no longer works since 4.1.5 with postcss #207
Comments
If you set |
But it's there, postcss process it. And it was working before 4.1.5 |
Okay. I'll look into it and get back to you. |
+1 |
there's the code from 'rollup-plugin-postcss' :
the vue plugin extract style code, and put a id like 'xxx.vue?rollup-plugin-vue=styles.0.css', the query string '?rollup-plugin-vue=styles.0.css' will be killed by the code above
then, |
Ran into this issue as well. Postcss worked fine in v2.2. I updated to v4 latest and Postcss won't run CSS nano. I can roll back to rollup-plugin-vue v4.1.4 and it works, kinda. Would be good to get an official fix on this so I can update my dependencies in my Rollup boilerplate. Thanks for the plugin. Without updating the vue rollup plugin, I get errors like this |
I spent a few hours digging around in the code for rollup-plugins-vue and rollup-plugins-postcss to figure out what PostCSS wouldn't work with the latest rollup-plugin-vue version. The post above was kinda vague. I've never dug into the code of any build tool, just always installed plugins. So forgive me if this isn't a complete solution. I was going crazy with this not working. Using the information @scrollbar-ww posted, I was able to get my css file to pass through postcss and cssnano. The issue I found has to do with the resolved id using the extension Original code from index.ts
My changed code, notice the
Here is my relevant rollup plugins config. Note,
Original CSS from SampleComponent.vue:
If I do not include
If I remove my changed code from rollup-plugin-vue my CSS output is unchanged by PostCSS.
With my change in place, my output is:
I have no clue about the implications of this for LESS or other preprocessors, if that matters at all. Curious to get your take on this. It was driving my crazy, and I was originally just not going to mess with it, but curiosity and OCD got the better of me. Given this is free software, figured I would do what I could do debug this. Hopefully this helps. Let me know if you have any questions. |
In the latest release of |
Expected behavior
Build not fails
Actual behavior
Build fails
In 4.1.4 all works fine. In 4.1.5 and 4.2.0 - no.
Steps to reproduce the behavior
Here is my rollup config
The text was updated successfully, but these errors were encountered: