We've moved discussions to Discord

Esbuild not reloading

adrien nhem
Update: it looks like any chances made to any of the css files is not propagated. It looks like it is not bundling but using a cached version somehow. e.g: if I update the color of the tabs in tabs.css nothing happens and the color remain. Is there a way to reset the esbuild? Should I just remove the files from the build folder?


Hey!

I can't seem to find a way to add my custom css. 

I have created a style.css file under app/assets/stylesheets/style.css
The file only contains: 
.test {
  color: white;  
}

I have the following in the head tag of application.html.erb
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>   
<%= stylesheet_link_tag "application", media: "all", "data-turbo-track": "reload" %>

I imported the file at the bottom of application.tailwind.css I obviously applied the class to one of my element (this is the only class applied to that element).  

@import "style.css";

The file seems to be imported correctly as if add a typo to the file I see an error when running bin/dev. 

The only way for css to be applied is when I wrap my css in a style tag directly in the view. 

Any idea of what I am doing wrong? 
adrien nhem
SOLVED: 

It's really weird what happened. 

Steps to debug: 
- shut down server. 
- remove files from the builds folder. 
- delete the assets folder in public. 
- run rails assets:clobber 
- run the server again and now it works. 
Notifications
You’re not receiving notifications from this thread.