Home > Web Front-end > JS Tutorial > body text

How to solve the problem that webpack font icon cannot be displayed

php中世界最好的语言
Release: 2018-03-28 09:39:36
Original
2020 people have browsed it

This time I will bring you how to solve the problem that the webpack font icon cannot be displayed. What are the precautions to solve the problem that the webpack font icon cannot be displayed? The following is a practical case, let's take a look.

Problem: When using font icons during project development, the error is reported as follows:

All font icons None of them can be displayed normally, and an error message indicates that the font cannot be decoded.

Solution to the problem: After searching for a long time, I finally found that the error was caused by manually adding the following code during webpack configuration: in webpack.base. conf.js fileDelete

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

Summary:

In fact, it is automatically generated by vue-cli

Configuration file has completed the compilation of the font icon file, and there is a conflict between the one written by myself and the automatically generated one

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related matters on the PHP Chinese website article!

Recommended reading:

vue’s local static image path

How to deal with memory overflow in angularjs

The above is the detailed content of How to solve the problem that webpack font icon cannot be displayed. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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