productdevbookcom / chatwoot

ChatWoot integration for Vue and Nuxt.
https://productdevbook.com/
MIT License
17 stars 3 forks source link

Partytown doesn't work with Chatwoot #35

Open mariofernandu opened 6 months ago

mariofernandu commented 6 months ago

Describe the bug

https://github.com/productdevbookcom/chatwoot/assets/102629955/977063a1-eec6-4fb9-a7bd-b9f80daa78b0

I think the problem is in Iframe

image

Nuxt 3

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: [
    "nuxt-purgecss",
    "@nuxt/image",
    "@nuxtjs/partytown",
    "@productdevbook/chatwoot",
  ],
  partytown: {
    debug: true,
    forward: [
      "chatwootSDK.run",
      "chatwootSDK.run",

      "$chatwoot.toggle",
      "$chatwoot.toggle",

      "$chatwoot.isOpen",
      "$chatwoot.isOpen",

      "$chatwoot.websiteToken",
      "$chatwoot.websiteToken",
    ],
  },

.....

  chatwoot: {
    init: {
      websiteToken: "exampleToken",
      baseUrl: "https://chat.hostname.com",
    },
    // If this is loaded you can make it true, https://github.com/nuxt-modules/partytown
    partytown: true,
  },
});

Reproduction

N/A

System Info

nuxt 3

Used Package Manager

yarn

Validations

productdevbook commented 3 months ago

cc: https://github.com/chatwoot/chatwoot/issues/5295