I use webpacker with Rails and am installing taildwindcss right now. Their installation guide says to use an @import
method if I'm using postcss-import
. I must say I get confused whenever I have to import CSS to Rails with webpacker, so I have a few questions:
1) The @import
method from the docs - is it a JavaScript or CSS import method?
2) If it's a CSS method, why do I have to paste it inside javascript folder (e.g. javascript/stylesheets
? I tried to put it inside the application.css file and it doesn't work. I assume it is somehow related to the fact that it's using PostCSS and package was installed via yarn?
3) If the above is true, does it mean that I have to import every CSS package that way if it's installed via yarn?