You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since we swapped static-dev/file-loader for static-dev/source-loader, we lost the ability to [easily] hash the output paths. we overlook this at times because netlify handles it for us, but in instances where we have to host somewhere else, this is a valuable feature.
We can use the loader-utils package to hash the name on the way out (ref)
One issue we'll run into here is that when the assets are hashed, you can reference them by require-ing their path in any given file in order to get the reference to resolve correctly. However, we have removed parsing for require from our jade process, and I think it also will not work for css. So we either have to hack the jade compiler again to bring this back in, or come up with another way to ensure that even hashed asset paths can stay consistent.
So looking at this again, I feel like the way to take care of it would be a pair of plugins for postcss/posthtml that would grab and replace asset paths with hashes. These two libraries already parse the trees, so it shouldn't be an issue for us to isolate asset paths. As long as they both use the same hashing technique, they will generate matching hashes and all will be well.
since we swapped
static-dev/file-loader
forstatic-dev/source-loader
, we lost the ability to [easily] hash the output paths. we overlook this at times because netlify handles it for us, but in instances where we have to host somewhere else, this is a valuable feature.We can use the loader-utils package to hash the name on the way out (ref)
cc @rmfarrell
The text was updated successfully, but these errors were encountered: