| 18 | const solidBrowserImports = () => ({ |
| 19 | name: 'solid-browser-imports', |
| 20 | resolveId(id: string, importer?: string) { |
| 21 | // Resolve the browser runtime explicitly. This keeps Solid bundled in |
| 22 | // query-devtools, as it was with tsup-preset-solid, while keeping d.ts |
| 23 | // imports unchanged. |
| 24 | if (importer?.includes('.d.')) return undefined |
| 25 | const browserId = solidBrowserIds[id] |
| 26 | if (browserId) { |
| 27 | return { id: browserId, external: false } |
| 28 | } |
| 29 | return undefined |
| 30 | }, |
| 31 | }) |
| 32 | |
| 33 | // Loads `./styles.css?inline` as a string, as Vite does in the tests. The CSS |