Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐞] Intercom does not work with party town #602

Open
dbelouslv opened this issue Jun 19, 2024 · 2 comments
Open

[🐞] Intercom does not work with party town #602

dbelouslv opened this issue Jun 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dbelouslv
Copy link

dbelouslv commented Jun 19, 2024

Describe the bug

Good morning! I have a problem with Intercom and partytown. These lines from head. If I remove patrytown scripts and type="text/partytown" Intercom works.

 <script>
     partytown = {
         forward: ['Intercom']
     };
 </script>

 <script type="module" src="/~partytown/partytown.js"></script>
 
 <script type="text/partytown">
    window.intercomSettings = {
        api_base: "https://api-iam.intercom.io",
        app_id: "xxx",
    };
</script>

<script type="text/partytown">
    (function () { var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', w.intercomSettings); } else { var d = document; var i = function () { i.c(arguments); }; i.q = []; i.c = function (args) { i.q.push(args); }; w.Intercom = i; var l = function () { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/xxx'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); }; if (document.readyState === 'complete') { l(); } else if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })();
</script>

image

And vite.config.js example:

export default defineConfig({
    base: '/',
    plugins: [
        vue({
            template: {
                compilerOptions: {
                    whitespace: 'preserve'
                }
            }
        }),
        partytownVite({
            dest: fileURLToPath(new URL("./public/~partytown", import.meta.url)),
        })
    ]
});

Reproduction

''

Steps to reproduce

Open the website

Browser Info

Chrome last version, in Mozilla it works

Additional Information

Vite: 5.1.3
Vuejs 3.4.19

@dbelouslv dbelouslv added the bug Something isn't working label Jun 19, 2024
@corymharper
Copy link

Just ran into this myself, any workarounds?

@anoam99
Copy link

anoam99 commented Aug 26, 2024

Same here...
any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants