We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3da707e commit 5003976Copy full SHA for 5003976
.changeset/cold-fireants-fry.md
@@ -0,0 +1,5 @@
1
+---
2
+'vite-plugin-solid': patch
3
4
+
5
+handle empty query string
src/index.ts
@@ -302,9 +302,13 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
302
typeof extension === 'string' ? extension : extension[0],
303
);
304
305
- id = id.replace(/\?.+$/, '');
+ if (!filter(id)) {
306
+ return null
307
+ }
308
309
+ id = id.replace(/\?.*$/, '');
310
- if (!filter(id) || !(/\.[mc]?[tj]sx$/i.test(id) || allExtensions.includes(currentFileExtension))) {
311
+ if (!(/\.[mc]?[tj]sx$/i.test(id) || allExtensions.includes(currentFileExtension))) {
312
return null;
313
}
314
0 commit comments