0

I'm trying to include css file in index.html of vue2 app using link tag in head section.

It shows the call in inspect element network tab but response is blank. And the style is not applied in DOM.

When I import it in App.Vue using import syntax, it included successfully.

Can anyone tell why it does not apply form index.html?

1 Answer 1

1

VueJS, is not loving <link>.. you should use

<style src="your/path/css/maradona.css"></style>

but if you insists just keep mine in /static/.

<link rel="stylesheet" type="text/css" href="/static/youKnow.css">
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.