Currently, I am developing a small project with Nuxt JS and I am facing a challenge in calling some Javascript files from my static directory. When it comes to CSS files, I have been able to do it successfully using the following code:
css: [
'./static/css/theme/bootstrap.min.css',
'./static/css/theme/bootstrap_limitless.min.css',
'./static/css/theme/layout.min.css',
'./static/css/theme/components.min.css',
'./static/css/theme/colors.min.css',
'./static/css/theme/toastr.css',
'./static/css/theme/override.css',
'./static/css/theme/icons/icomoon/styles.min.css'
],
I attempted to achieve the same outcome for Javascript by using a script like this:
script: [
'./static/js/test.js'
],
Unfortunately, this approach did not work as expected as my test file is located inside /static/js/
.