Home > Web Front-end > JS Tutorial > How to reference Ali font icon in vue

How to reference Ali font icon in vue

亚连
Release: 2018-06-06 11:23:36
Original
2476 people have browsed it

This article mainly introduces the solution to the error problem when referencing Alibaba font icons in Vue. Interested friends can learn together.

I want to quote Alibaba's iconfont in Vue, but an error occurs. The reason is There is no corresponding loader to process font files.

Solution

1.Introduce css file

import 'font-awesome/css/font-awesome.min.css'
Copy after login

2.Configure

{
    test: /\.(eot|svg|ttf|woff|woff2)$/,
    loader: 'file-loader'
}
Copy after login
in webpack.config

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

How to solve the problem of change events in the VUE listening window

watch monitoring routing changes and watch monitoring objects ( Detailed tutorial)

How to implement changes in watch monitoring objects and corresponding values ​​in vue

The above is the detailed content of How to reference Ali font icon in vue. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
vue
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template