Skip to content

Commit 3da707e

Browse files
authored
fix: tsr-split loading (#189)
1 parent f0062a1 commit 3da707e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/rare-owls-shop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'vite-plugin-solid': patch
3+
---
4+
5+
Support query string in tsx/jsx files

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
302302
typeof extension === 'string' ? extension : extension[0],
303303
);
304304

305+
id = id.replace(/\?.+$/, '');
306+
305307
if (!filter(id) || !(/\.[mc]?[tj]sx$/i.test(id) || allExtensions.includes(currentFileExtension))) {
306308
return null;
307309
}
@@ -320,8 +322,6 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
320322
solidOptions = { generate: 'dom', hydratable: false };
321323
}
322324

323-
id = id.replace(/\?.+$/, '');
324-
325325
// We need to know if the current file extension has a typescript options tied to it
326326
const shouldBeProcessedWithTypescript = /\.[mc]?tsx$/i.test(id) || extensionsToWatch.some((extension) => {
327327
if (typeof extension === 'string') {

0 commit comments

Comments
 (0)