Fixes #16233
Vite has a number of special parameters that can be appended to `.css`
files that make it actually load as a JavaScript module. One such
parameter that we haven't handled before is the `?commonjs-proxy` flag.
When importing e.g. `plotly.js/lib/core`, the dependency tree would
eventually load a file called `*.css?commonjs-proxy`. We previously
scanned this for candidates even though it was not, in-fact, a
stylesheet.
This PR fixes this by adding the `?commonjs-proxy` to the ignore list. I
have also updated `SPECIAL_QUERY_RE` to more closely match the Vite
implementation. It does seem like this was the only condition we were
missing, though:
|
||
|---|---|---|
| .. | ||
| astro.test.ts | ||
| config.test.ts | ||
| css-modules.test.ts | ||
| html-style-blocks.test.ts | ||
| ignored-packages.test.ts | ||
| index.test.ts | ||
| multi-root.test.ts | ||
| nuxt.test.ts | ||
| other-transforms.test.ts | ||
| resolvers.test.ts | ||
| solidstart.test.ts | ||
| ssr.test.ts | ||
| svelte.test.ts | ||
| url-rewriting.test.ts | ||
| vue.test.ts | ||