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

How to reference Ali font icon in vue

亚连
亚连Original
2018-06-06 11:23:362467browse

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'

2.Configure

{
    test: /\.(eot|svg|ttf|woff|woff2)$/,
    loader: 'file-loader'
}
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!

Statement:
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