You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
createEffect called in dev mode but not in production build #1843
The focusedElm is meant to be a global signal. Inside a Browse page I have:
const Browse = () => {
const [focusedElm, setFocusedElm] = useFocusManager();
let focusRingRef;
createEffect(on(focusedElm, (elm) => {
console.log('Focused Ring Change', elm);
if (focusRingRef?.lng && elm?.lng) {
// No Absolute X Y yet from renderer
focusRingRef.lng.parent = elm.lng;
}
}, { defer: true}))
When running in dev mode, both effects are being called as expected. When I build for production only the effect in the focusManager module is being called. The one in the Browse page never gets called. I've tried not using on and defer and various mutations to try to get it working but I'm stumped by the difference in build between dev and prod that would cause this.
Your Example Website or App
none
Steps to Reproduce the Bug or Issue
dev vs prod
Expected behavior
I expect createEffect to be called in both dev and prod
Activity
chiefcll commentedon Aug 6, 2023
I think I found the issue which is I'm bundling solid-js twice... which is causing two environments to be created. Will close this out.