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

通过npm install element-ui@next ,引进项目时, 在window10下运行时会报如下错: #35

Closed
perfectyang opened this issue Sep 8, 2016 · 9 comments

Comments

@perfectyang
Copy link

perfectyang commented Sep 8, 2016

通过npm install element-ui@next ,引进项目时, 在window10下运行时会报如下错:

Failed to decode downloaded font: http://localcaiwu.soouya.com/dist/fonts/element-icons.eot?b176c7brecoverDebt:1 OTS parsing error: invalid version tag导致每次热更新都很慢,有时候会热更新失效

@perfectyang perfectyang changed the title 今天拉下来的项目,跑起来报错了,昨天的项目没有问题 通过npm install element-ui@next ,引进项目时, 在window10下运行时会报如下错: Sep 8, 2016
@QingWei-Li
Copy link
Contributor

是用 webpack 打包的?看起来是字体文件的 loader 没有配置对

@perfectyang
Copy link
Author

我刚提了个pr ,看能不能通过,因为公司正在用这套ui

@perfectyang
Copy link
Author

{
test: /.(woff2?|eot|ttf|otf)(?.*)?$/,
loader: 'url',
query: {
limit: 20000,
name: 'fonts/[name].[ext]?[hash:7]'
}
}
这是我的webpack配置, 我在vue文件里面直接将@import 'element-ui/lib/theme-default/index.css';引进去

@QingWei-Li
Copy link
Contributor

http://localcaiwu.soouya.com 是啥?你用 nginx 之类的做代理的?有配置 fonts/ 目录 rewrite 么

@perfectyang
Copy link
Author

nginx 作转发, 在nginx配置如下:

server {
    listen       80;
    server_name  localcaiwu.soouya.com;

    location ~ ^/redwood/.*\.do {
        proxy_set_header Host devhongshan.soouya.com;
        proxy_pass http://devhongshan.soouya.com; #开发
        #proxy_set_header Host testcaiwu.soouya.com;
        #proxy_pass http://testcaiwu.soouya.com;
    }
    location / {
        proxy_pass http://localhost:3070;
        #proxy_set_header Upgrade $http_upgrade;
        #proxy_set_header Connection "upgrade";
        #proxy_set_header Host $host;
    }
}

@QingWei-Li
Copy link
Contributor

那你并没有 rewrite 静态资源文件啊,我也没配过,不过肯定漏了些配置 🌚

@perfectyang
Copy link
Author

奇怪的是,在mac开发,就不会报这个问题

@QingWei-Li
Copy link
Contributor

QingWei-Li commented Sep 8, 2016

location ~ ^/(?:fonts)/ {
  break;
}

maybe

@perfectyang
Copy link
Author

我试试

zhn4 pushed a commit to zhn4/element that referenced this issue Aug 7, 2020
* improvement(select): filterable & clearable as default

* improvement(cascader): filterable & clearable as default

* chore: eslint --fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants