On my local, (and on the Netlify build) the local fonts declared in the CSS are not copied to the static directory when the static site is exported.
The problem seems to be the aggregated CSS path doesn't get processed in the function exportPaths()
during the condition if($this->copyPath($sanitized_path, $destination))
since the aggregated CSS has not been generated yet in the filesystem, when running "cold" (like after a Cache Clear).
- local or in-build Drupal 10.1 with Tome 1.11
- A custom CSS declaring a @font-face
rule with a relative path to the font
- run drush cr; drush tome:static
If I don't clear the cache and run the command (after removing the output directory), the assets are exported correctly.
Another issue that emerges is that when i perform a second run for drush tome:static
, all the other assets are not processed again.
This issue may seems a duplicate of #3331190: Aggregated CSS with relative URLs breaks. β but it is not related since the paths within the CSS are generated correctly, only the assets are not brought over. Furthermore the proposed patch doesn't work for in this instance.
I still need to figure it out. Ideally the CSS should be generated before getting the assets, like a sort of warmer.
This works only after a second export run, if the output folder has been removed (otherwise assets won't be regenerated).
Active
1.11
Code