swr
needs to be optimzeDeps
(cf. wakujs/waku#1493), but this is because use-sync-external-store
package is cjs only https://publint.dev/[email protected]. Probably there's a way to just catch this dep at least and automatically add it to optimizeDeps.include: ["... > use-sync-external-store"]
via vitefu package traversal.
This is tedious than I thought. Since use-sync-external-store
has many entry points, we need to optimize each of them https://publint.dev/[email protected]. I guess at this point, we can just target swr
?
It doesn't look like vitefu allows customizing optimizeDeps.include
detection though https://github.com/svitejs/vitefu/blob/d8d82fa121e3b2215ba437107093c77bde51b63b/src/index.js#L245.