A
A
Abdul Amenov2019-11-22 09:03:30
Vue.js
Abdul Amenov, 2019-11-22 09:03:30

How to properly add scripts to Nuxt.js?

Hello!
I chose the Vue.js category because Nuxt.js was not found.
Please tell me how to properly include jQuery, Bootstrap, etc. in Nuxt.js?
For CSS I do this:

css: ["bootstrap/dist/css/bootstrap.min.css", "~/static/css/common.css"]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WinPooh32, 2019-11-22
@WinPooh32

jquery and vuejs together?
In nuxt.config.js :

modules: [
    'bootstrap-vue/nuxt',
  ],

D
dev-sasha, 2021-02-05
@dev-sasha

To connect bootstrap there is bootstap-vue.
It’s well written about him here: Bootstrap-Vue - What is the feature of this symbiosis?
Using jQuery in Vue should be avoided.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question