| 1 | // Loader hook for tsx-based tests: static asset imports (SVG logos, etc.) |
| 2 | // resolve to an empty string default export so component tests can import |
| 3 | // components whose transitive store/component chain pulls in an asset. |
| 4 | export async function load(url, context, nextLoad) { |
| 5 | if (url.endsWith(".svg") || url.endsWith(".png") || url.endsWith(".webp")) { |
| 6 | return { format: "module", source: "export default \"\";", shortCircuit: true }; |
| 7 | } |
| 8 | return nextLoad(url, context); |
| 9 | } |
| 10 |