Everything works when developing local but when I deploy to vercel I get a preact error. It looks like the the bundling of preact components is failing. Heres whats the browser returns:
import{s as d}from"./chunks/index.e3b0c442.3e2196e7.js";import{l as u,p as c}from"./chunks/preact.module.dfa46238.js";import{p as f,h as m}from"./chunks/hooks.module.91ff0612.js";var p=0;function l(r,e,s,a,t){var o,n,i={};for(n in e)n=="ref"?o=e[n]:i[n]=e[n];var _={type:r,props:i,key:s,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--p,__source:t,__self:a};if(typeof r=="function"&&(o=r.defaultProps))for(n in o)i[n]===void 0&&(i[n]=o[n]);return u.vnode&&u.vnode(_),_}function v({isLoading:r,children:e}){return l(c,{children:r?l("div",{className:d.skeleton,children:l("span",{className:"invisible",children:e})}):e})}function k({classes:r,src:e,alt:s}){const[a,t]=f(!0),o=new Image;return o.alt=s,o.src=e,m(()=>{const n=new Image;n.src=e,n.onload=()=>{t(!1)}}),l(c,{children:l(v,{isLoading:a,children:l("img",{class:r,src:e,alt:s,loading:"lazy"})})})}export{k as default};
Where am using the component am setting the hydration to : client:load
Am importing styles module based like so: import styles from "./index.module.scss";
Heres my astro config:
site: SITE,
integrations: [
tailwind(),
preact(),
],
output: "server",
adapter: vercel(),
});```
Has anyone experience the same issue?