aircall / aircall-everywhere

SDK to embed and communicate to Aircall phone in any web page
https://aircall.github.io/aircall-everywhere
25 stars 16 forks source link

TypeError : X is not a constructor (Vite.js) #83

Open itag-tech opened 1 year ago

itag-tech commented 1 year ago

In a Vite 4.0.1 project, I encountered the following error. image

My code (useAircallDialer.tsx) image

After a few hours, the only solution we found was to add to your Vite configuration :

export default defineConfig({
  build: {
    commonjsOptions: { include: [] },
  },

  optimizeDeps: {
    disabled: false,
  },
}

I am writing this here to prevent