My mistake.. it seems it's neither the frontmatter nor the astro.config.mjs... it's actually like in any other framework.. it's within the script tags in the component..;-)..
Sorry for overthinking the issue, it seems to work fine when I follow the normal methods..;-)..
However in the console I still do get the same error message.. but the code/script works fine..
Regards,
Alim