django-vuejs-tutorial icon indicating copy to clipboard operation
django-vuejs-tutorial copied to clipboard

How to use bootstrap from node-modules

Open jonalxh opened this issue 5 years ago • 5 comments

Hi, I'm trying to add css in my index.html file but I'm unable to do it, I've tried:

<link rel="stylesheet" href='../../node_modules/bootstrap/dist/css/bootstrap.min.css'>
<link rel="stylesheet" href='/node_modules/bootstrap/dist/css/bootstrap.min.css'>

But none of them works, Could you help me please?

jonalxh avatar Jan 14 '20 17:01 jonalxh

Hi. If you are gonna add bootstrap to vue, I'd recommend following the approach here.

michaelbukachi avatar Jan 14 '20 18:01 michaelbukachi

But what if I want to use a custom CSS file located at assets or the static folder inside the App? I want to import inside the index.html, not from the JS.

jonalxh avatar Jan 14 '20 18:01 jonalxh

Then I'd suggest using Django Static management since they are no longer within the scope of a VueJS app.

michaelbukachi avatar Jan 14 '20 19:01 michaelbukachi

Do you hace an example?

jonalxh avatar Jan 14 '20 20:01 jonalxh

Not at the moment.

michaelbukachi avatar Jan 14 '20 20:01 michaelbukachi