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

Webpack 整合 fontmin 的 case #58

Open
chriswong opened this issue Oct 12, 2017 · 4 comments
Open

Webpack 整合 fontmin 的 case #58

chriswong opened this issue Oct 12, 2017 · 4 comments

Comments

@chriswong
Copy link
Member

现有构架是 webpack + fontawesome,期望可以在 webpack 中直接加入 fontmin(fontmin-loader?)实现,最理想是现存样式中的 \Fxxx 无需修改。

@junmer
Copy link
Contributor

junmer commented Oct 12, 2017

fontawesome 大多数人 应该是这样用的吧

<i class="fa fa-camera-retro fa-lg"></i> fa-lg
<i class="fa fa-camera-retro fa-2x"></i> fa-2x
<i class="fa fa-camera-retro fa-3x"></i> fa-3x
<i class="fa fa-camera-retro fa-4x"></i> fa-4x
<i class="fa fa-camera-retro fa-5x"></i> fa-5x

如果 还要考虑 使用 .vue, .jsx 的话
确实 有点麻烦呢
通过类似 extract-text-webpack-plugin 的方案解决怎么样?

@chriswong
Copy link
Member Author

我没有直接这样用,用的 mixin,fa(search) 这种

extract-text-webpack-plugin 跟 fontmin 怎么结合?

@junmer
Copy link
Contributor

junmer commented Oct 12, 2017

啥 mixin? 求代码?

估计要做个 fontmin-text-webpack-plugin 收集特征

@chriswong
Copy link
Member Author

https://github.com/raulghm/Font-Awesome-Stylus/blob/master/lib/font-awesome-stylus/mixins.styl#L24

收集特征是指遍历相关的样式代码,找 content: '\Fxxx' 这样的代码?

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