dcloudio / dcloudio/uni-app

css文件中font-face压缩成一行后编译报错

Open
#2,206 0 comments 0 reactions 0 assignees View on GitHub
h5 提供了复现方案
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

**问题描述**
引入第三方库的css文件是压缩过的,通过分析是@font-face的内容在压缩成一行后会报错,格式化后就没问题

**复现步骤**
新建个css文件,内容如下,然后在App.vue中import它,执行npm run dev:h5 就会报错
```css
@font-face{font-weight:400;font-family:vant-icon;font-style:normal;font-display:auto;src:url(https://img.yzcdn.cn/vant/vant-icon-96970a.woff2) format('woff2'),url(https://img.yzcdn.cn/vant/vant-icon-96970a.woff) format('woff'),url(https://img.yzcdn.cn/vant/vant-icon-96970a.ttf) format('truetype')}
```

uni-app使用的cli是最新版本2.0.0-29320201014001

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.