In dev mode solid-js module is being dedup to ensure its only being bundled once. But when you build for production its not and thus solid-js can be bundled twice leading to side effects like createEffect not having a root because there are two solids running.
I think the solution is to always set dedup and optimizeDeps to the libraries you have listed to prevent them from being bundled twice or be able to pass in dedupe: [...nestedDeps, ...solidPkgsConfig.nestedDeps]
This is related to: solidjs/solid#1843 and is the root cause of that issue.