I tried to import my local JS file in the "head" part of the nuxt.config.js file but failed. It is ok to import the "CDN" file in the same location
Asked
Active
Viewed 182 times
1
-
Hi, it's pretty cryptic as of what you want to include in your head. Especially without any code or [repro]. Give a look to this one: https://stackoverflow.com/a/67535277/8816585 – kissu Dec 30 '21 at 10:22
-
1Also, importing some code from a CDN may be okay, depending of the type of thing you're importing. Usually, it's better to install the package in your `node_modules` because it will be bundled and more optimized overall. But some things may be fine with a CDN too. – kissu Dec 30 '21 at 10:24
-
@kissu Finally, the corresponding plug-in was installed through NPM to solve the problem. – Leeqi7 Dec 31 '21 at 01:01
1 Answers
1
Installing the package through NPM solved the issue.
On top of cleaning a bit the current codebase.

kissu
- 40,416
- 14
- 65
- 133