Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 5.1 app does not seem to load Vue component CSS

I'm trying out a brand new Rails 5.1.4 app, installing both the default webpacker and vue scripts

rails new app --webpack rails webpacker:install:vue

I'm trying out the new app with the include hello_vue.js sample file.

"Hello Vue!" gets rendered, but the scoped css included in the component is not.

Is this a bug? Any work-arounds?

like image 781
Chih-Chao Lam Avatar asked Jan 01 '26 01:01

Chih-Chao Lam


1 Answers

Thanks @Chris O'Sullivan, I did not include stylesheet_pack_tag. This seems to be a new requirement moving from Webpacker 2 to 3

like image 142
Chih-Chao Lam Avatar answered Jan 06 '26 06:01

Chih-Chao Lam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!