I am using pagefind (https://pagefind.app/), pagefind just crawls your static build and generates some code that you can use to query your build output (anchor tags, headers, etc).
Because pagefind will generate their js file only once the build is done the pagefind.js file is not present during the build so vite complains:
[vite:load-fallback] Could not load C:\Users\hugok\Documents\Work\Halloy\Halloy Docs\src\lib/../../static/_pagefind/pagefind.js (imported by src/lib/pagefind/pagefind.ts): ENOENT: no such file or directory, open 'C:\Users\hugok\Documents\Work\Halloy\Halloy Docs\static\_pagefind\pagefind.js'
error during build:
Error: Could not load C:\Users\hugok\Documents\Work\Halloy\Halloy Docs\src\lib/../../static/_pagefind/pagefind.js (imported by src/lib/pagefind/pagefind.ts): ENOENT: no such file or directory, open 'C:\Users\hugok\Documents\Work\Halloy\Halloy Docs\static\_pagefind\pagefind.js'
ELIFECYCLE Command failed with exit code 1.
Can I somehow supress or disable this for a specific dynamic import?