Nuxt/kit: when creating a module, how can I inject a script into the body
Hi there. I am currently creating a nuxt module. One of the things I need to do is, I have a minified .js file I want to inject into the body. But only on client side. I tried
This does include the script directly, so also in SSR. When adding something like
I am sure that
Do you know any method to add a file into the
This does include the script directly, so also in SSR. When adding something like
if (typeof window !== 'undefined') to only inject it on the client-side, it never gets injected since the src/module.ts seems to only run once on start.I am sure that
addTemplate is not the right method. Do you know any method to add a file into the
public folder?