Unverified Commit 618d6744 authored by Shu Ding's avatar Shu Ding Committed by GitHub

Filter out CSS files from middleware files and client reference chunks (#57482)

There could be CSS files emitted in these chunks so both manifests need
to filter them out. This fixes `app dir - css css support chunks should
bundle css resources into chunks`.
parent abb34da8
......@@ -865,6 +865,7 @@ impl AppEndpoint {
async move {
Ok(node_root_value
.get_path_to(&*file.ident().path().await?)
.filter(|path| path.ends_with(".js"))
.map(|path| path.to_string()))
}
}
......@@ -882,6 +883,7 @@ impl AppEndpoint {
async move {
Ok(node_root_value
.get_path_to(&*file.ident().path().await?)
.filter(|path| path.ends_with(".js"))
.map(|path| path.to_string()))
}
})
......
......@@ -160,6 +160,9 @@ impl ClientReferenceManifest {
.iter()
.filter_map(|chunk_path| client_relative_path.get_path_to(chunk_path))
.map(ToString::to_string)
// It's possible that a chunk also emits CSS files, that will
// be handled separatedly.
.filter(|path| path.ends_with(".js"))
.collect::<Vec<_>>();
let ssr_chunks_paths = ssr_chunks
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment