Based on the IT journey of Michael Rickert

Rails 6.0.0 rc1 and webpack issues

A quick note for anyone else running into this issue with the latest version of rails (6.0.0 rc1) and webpack. When you create a new rails application and try to import any type of css or scss file into the javascript pack folder you’ll find the files never load and your site won’t load any css along with it. After far too much digging I found this was an issue with babel trying to insert itself in the webpack compiling process and failing, causing the webpack import of css files to fail. The temporary fix is simple: Remove the babel config file from the main rails app directory (babel.config.js) and then restart your rails server. You’ll find your css files all load up properly and everything works as intended, hopefully babel/webpack fixes this soon!

Leave a Reply