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>
Confirm, I'm having the same problem, with Intercom:
I made a code pen here or a fiddle here while I was testing this issue using Intercom and Userway, but as @dbelouslv said changing the type to simple javascript and the widgets show. With the type to partytown nothing works. Any updates?
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.
And vite.config.js example:
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