Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less @import error #22

Open
daveztong opened this issue Dec 19, 2018 · 0 comments
Open

Less @import error #22

daveztong opened this issue Dec 19, 2018 · 0 comments

Comments

@daveztong
Copy link
Owner

daveztong commented Dec 19, 2018

Error

为了修改antd的默认字体,在ant-default-vars.less中引入@import url("http://fonts.proxy.ustclug.org/css?family=Ubuntu"); 后出现了编译的错误,

Expected ')' got '"'

尝试了

@import (css) url("http://fonts.proxy.ustclug.org/css?family=Ubuntu");

still no luck.

Solution

Less

最后尝试移除http scheme,then suddenly it's working!

@import url("//fonts.proxy.ustclug.org/css?family=Ubuntu");

CSS

@import (css) url("http://fonts.proxy.ustclug.org/css?family=Ubuntu");

Ref: webpack-contrib/less-loader#67

字体CDN

https://blog.csdn.net/maxsky/article/details/51980438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant