There are two options to get rid of this compile time penalty: Tell Yesod to ignore special subfolder or files Define another folder for generated assets and create another static route
The easiest way is to cover the first option by changing the StaticFiles.hs file in the Settings folder. Usually you will find the entry like this:
staticFiles (appStaticDir compileTimeAppSettings)
We just need to change this to a file list of files we would like to be checked:
staticFilesList (appStaticDir compileTimeAppSettings) [ , "css/app.css" , "css/vendor.css" , "js/app.js" ]
In this case, if there are any other folders with more assets (images, other js or css files), those files will be ignored during the compile time.
I hope this tutorial was helpful to reduce the compile time in Yesod. If you have any questions or comments on this, feel free to use the area below.