DEV Community

Discussion on: Nuxt.js v2.4.0 is out! TypeScript, Smart prefetching and more...

Collapse
 
sudhir600 profile image
SUDHIR K GUPTA

Hi Guys, in nuxt, is there a way to add css and javascript sequencely.
such as . i have to add (all in head)
1.css [then]
2.js [then]
3.css
but in in nuxt there is separate key [link] and [script] under head to add files.
let's assume 1st i am adding css file and then below js file adding body:true
head: {
link:[{'1.css'}, {'3.css'}]
script:[{'2.js', body:true}]
}

this code resolve head as (1,3,2) which is failed..
any idea, how to sequence it?