7

I am developing an app first time with VueJS 2 + Webpack And I have created a style.css file that I want to include globaly into index.html file in the root of my app

I have tried loading it from different folders (src, src/assets, root, src, components, node_modules) but as a result i always get 404 error for the specific file.

I have also tried all sorts of paths ../src , /src..., ./src... makes no difference..

What is the correct way to include a style.css file into your project? Where it should be located ? And how should I call it?

1 Answer 1

11

I figured out that local css file can be accessed by the main index.html file if it is located in "static" folder of the VueJs project

then just add to the <head> section of your index.html file <link rel="stylesheet" type="text/css" href='static/bootstrap.css'> and you are done.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.