So i already imported the application.scss with the tags
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
and it works
however i want to separate my css files and call them in specific views like in the home/index view call
<%= javascript_pack_tag 'home/index', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'home/index', media: 'all', 'data-turbolinks-track': 'reload' %>
ive achieved this creating a separate js file such as home.js and inside just importing my home.scss like this
import '../../stylesheets/home/index'
my question is, is this the correct way?
do i always have to create a js file to import my css file?
is there a better aproach?