Open LumaKernel opened 5 days ago
I agree that having a chain of internal build dependencies makes sense. However, this will be a bigger task, as trunk currently has no idea, other than the hard coded order of running processors.
I think it makes sense adding this to a more long-term roadmap. And I think the idea to represent this with the link
element makes sense. I'd definitely like to consider this for a post 0.21.x
release.
Description
<link data-trunk>
is fetching the data which is existing before building of Rust resources. If Rust compilation creates the assets like stylesheet (for example, this is done by stylers, which is static stylesheet generator), they are not correctly loaded by Trunk as non-existent file, or fetching old one which is made by the last build, which cause the version mismatch.Stylers officially offers the way for this by adding following post_build script, but this is intended for
<link rel=stylesheet>
withoutdata-trunk
, which is not tracked by Trunk and loaded dynamically. It's problematic. Cache wouldn't be busted in local development/production, and optimization is not done by Trunk.The full entrypoint html is like following:
Expected feature
I want the feature to specify the dependency of them, or just wait all asset fetching after Rust resources' builds.
First idea would look like following:
Not sure how can we treat that if there're multiple dependencies.
Second idea is simple, but not extensible.