I cant get my component specific CSS to load properly when deploying to production. The CSS from my client folder (Semantic UI) is loading fine but not those lines defined within <style lang="less" scoped></style> in the component.
Im running my app like this NODE_ENV=production meteor --production --settings settings.json and it starts fine just without the CSS.
Oh, so maybe I should have understood this but my components CSS did not work because I had removed standard-minifier-css@1.3.4 and added juliancwirko:postcss and less@2.7.9 in order to make Semantic UI work previously. Now my components CSS loads but not Semantic UI’s after adding standard-minifier-css@1.3.4 and akryum:vue-less
@nilsi Hey, I’m running into the same issue now, trying to deploy to production with Meteor/Vue but
not seeing my CSS… removing the juliancwirko:postcss and adding the standard minifier works, but than
I can’t use the postcss plugins i was using…
Have you gotten around this somehow? or is rewriting my CSS the only option?
@webkit You can use my nathantreid:vue-css-modules package to handle the postcss processing. It ties into my main package, nathantreid:css-modules, which amongst other things allows you to configure your postcss pipeline. You can also disable the CSS modules piece, leaving you with a postcss processor.
Here’s an example that uses scoped stylus with custom postcss plugins inside .vue components: https://github.com/nathantreid/vue-component-test/commit/76a2afaa492e79751d5016141f288d16aaabe64b
The CSS modules plugin is configured via the cssModules attribute in package.json. In the example I’ve prevented the plugin from running on your .css files by changing the extension it handles to dontprocessanything. I’ve then customized the PostCSS plugins to use run postcss-autoreset. You can add other plugins here, in the order which they should run, just like with juliancwirko:postcss.
Since you’re not using CSS modules, it’s not as ideal as being supported directly within vue-component, but it should do the job for now.
@nathantreid thx for this solution, I’m now trying to use it a year later
I did as you said in your example trying to use Lost grid postcss plugin inside a .vue file,
but still it is not being compiled… not sure what I’m doing wrong…
Should I remove the juliancwirko package when I use yours?