brian said almost 3 years ago on esbuild for Rails :
How would you load icon fonts with esbuild. Create a loader or pull the css into the asset pipeline?

Trying to pull in fontawesome css:

JS:
import "@fortawesome/fontawesome-free/js/all";
import "@fortawesome/fontawesome-free/css/all.css";  // results in no loader configured for .woff, .eot etc. 

CSS Bundling
@use "@fortawesome/fontawesome-free/css/all.css" as *;   // no route matches /webfonts



benkoshy said over 2 years ago on esbuild for Rails :
When using es-build to manage bootstrap, there are two components involved:

(1) bootstrap javascript
(2) bootstrap styling

does it make sense to use cssbundling-rails https://github.com/rails/cssbundling-rails to manage the css portions of bootstrap, and use jsbundling-rails to manage the js components via es-build?

was curious to know everyone's thoughts on this approach?

David Kimura PRO said over 2 years ago on esbuild for Rails :
That's the approach I take with esbuild and cssbundling. You can check out https://www.github.com/driftingruby/template for what I use with new episodes. This uses jsbundling and cssbundling and installs bootstrap.

daijinara said about 2 years ago on esbuild for Rails :
David Kimura
Have you ever noticed about 'cache read failure error' on delivering 'theme.bundle.css', which is probably caused by the browser that user is using?
I encounter this experience below every time when I visit driftingruby for example.

   This is my primary concern using cssbundling. Keep it simple in Sprockets will never have this problem. I haven't tried on Procshaft yet.

Although this isn't the fault of your app and it's probably caused the mechanics of how modern browser works, most users don't care about these technicality and they want this to be fixed to trust your service. 

How can you fix this in esbuild and cssbundling setup? What's your thoughts about refactoring your driftingruby app asset pipeline if you want to fix this?


David Kimura PRO said about 2 years ago on esbuild for Rails :
  daijinara I think that the ERR_CACHE_READ_FAILURE is something about plugins or other tools on your system that is deleting the temp files. If you were to do a SHIFT + F5 (on windows) or CMD + SHIFT + R (on macos) then it should tell the browser to force download the files again and ignore your local cache.

There are some applications that will clear out temp files and your browser database did not get not of these changes.

  •  antivirus suites (Like Norton 360)
  • Dell SupportAssist
  • "Speed Optimization" apps like CleanMyMacX

I wonder if whatever thing that is causing your temp files to be cleared out is related to a long expiration life. Honestly, I don't know if there is anything to be done on the server side as this is getting served from CloudFlare's cache.

daijinara said about 2 years ago on esbuild for Rails :
  David Kimura Thank you so much for your reply. I fixed it by deleting all the cache from the 'history' features from Chrome. It's really nice to know what kind of tools in my system is causing this. BTW, I have Norton 360 and the ERR_CACHE_READ_FAILURE can be seen on major site such as Google Workspace as well. 

Login to Comment