0

I am porting over an older website into Nuxt 3. This older website has numerous <script> tags referring to local .js files. The intent is to generate pages using Nuxt3's SSG functionality to host the site, so any optimization Nuxt 3 can provide would be the preferred method. What is the best way to include these scripts?

Thank you.

kissu
  • 40,416
  • 14
  • 65
  • 133
Kobi
  • 4,003
  • 4
  • 18
  • 23
  • Did you tried that one: https://stackoverflow.com/a/67535277/8816585 – kissu Jul 07 '22 at 05:53
  • And also this one: https://stackoverflow.com/q/72848779/8816585 – kissu Jul 07 '22 at 05:54
  • Thank you for the responses. I have seen some of these. Most of the instructions are for Nuxt 2, and some of them have changed. Also, for Nuxt 2/3 I have seen many conflicting ways to do this, as plugins/, as modules/ as head – Kobi Jul 07 '22 at 18:46
  • Best way would be to do it locally in a single `.vue` file. Modules and plugins are fine too but it will be global, so not the best. Head `script` is probably the worst (especially if remote). `assets` would be okay I guess and `public` I don't really see the point tbh (especially because not bundled). – kissu Jul 07 '22 at 20:33

0 Answers0