query string parameters in node_modules (CSS) paths returns no content and 204
response
#690
Closed
1 of 5 tasks
204
response
#690
Type of Change
Summary
As part of testing development of theme packs (#689) it was observed that when a CSS file was referenced via an
import
, e.g.In this case, The URL being passed to plugin-standard-css was still including the query string and thus failing the extension check, since
path.extname
was also including the query string.css?type=css
and not just.css
, and thus failing the test;Details
This dovetails a little more into a discussion I opened to get a better handling on handling URLs and filesystem access, so will defer to that and so will just try and land a simple patch for this for now that tries to address the resolver issue detailed in that discussion
After Greenwood resolvers go first, the results of those never get passed to next plugins, because we always pass the original URL to each resolvers, instead of saying forwarding the results of the node_modules resolver to any other resolvers that may want to reuse that logic.
Thus, in the above situation, with the existing code, the query string was always getting passed to plugin-standard-css and it wasn't able to handle that since we've never tested it with node_modules paths + query strings.
The text was updated successfully, but these errors were encountered: