Import CSS file with Fonts in VueJS -


i have vue application , want use line-awesome font. in app.vue component import css file fonts in way:

@import 'assets/fonts/line-awesome/css/line-awesome.min.css';  

my problem no errors shown, fonts not loaded in app.

in css file, contains font face:

@font-face {   font-family: "lineawesome";   src: url("../fonts/line-awesome.eot?v=1.1.");   src: url("../fonts/line-awesome.eot??v=1.1.#iefix") format("embedded-opentype"),        url("../fonts/line-awesome.woff2?v=1.1.") format("woff2"),        url("../fonts/line-awesome.woff?v=1.1.") format("woff"),        url("../fonts/line-awesome.ttf?v=1.1.") format("truetype"),        url("../fonts/line-awesome.svg?v=1.1.#fa") format("svg");   font-weight: normal;   font-style: normal; } 

now don't know if problem because path wrong setted or need additional configuration in app.

some idea how can fix it?

place files under static directory , link

@import '/staic/fonts/line-awesome/css/line-awesome.min.css';

files in static/ not processed webpack @ all: directly copied final destination as-is, same filename.

some serious issue line-awesome css , fonts. loaded using normal simple html site source css , fonts (http://maxcdn.icons8.com/fonts/line-awesome/1.1/line-awesome.zip) giving box symbol icon.

sample code used test source below

<html> <head>   <link rel="stylesheet" href="./la/css/line-awesome-font-awesome.css"> </head> <body> <i class="fa fa-file-word-o"></i> </body> </html> 

output follows

output of line awesome

but if use cdn follows

<link rel="stylesheet" href="https://maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome-font-awesome.min.css">


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -