[Vuejs]-Vue-cli import css not work

0👍

Create a folder called static, put your css in and include link in your index.html

<link rel="stylesheet" type="text/css" href="/static/fille.css">

0👍

Another option seems to be, inside the App.vue file, within the <script> tag:

<script>
import "@/assets/css/base.css";
export default {};
</script>

But

<style src="@/assets/css/base.css"></style>

works just as well.

Leave a comment