raulghm / Font-Awesome-Stylus

Stylus port for font-awesome 4.7.0
https://github.com/raulghm/Font-Awesome-Stylus
GNU General Public License v2.0
78 stars 26 forks source link

how to make it work with webpack #25

Closed alexserver closed 7 years ago

alexserver commented 9 years ago

I'm importing the stylus like this: my custom source/stylus.styl

@import '../node_modules/font-awesome-stylus/stylus/index.styl'
$fa-font-path = '../node_modules/font-awesome-stylus/fonts'

this is giving me error when loading fonts.

ERROR in ./~/css-loader!./~/stylus-loader!./source/styles.styl
Module not found: Error: Cannot resolve 'file' or 'directory' ../fonts/fontawesome-webfont.eot in /Users/alexserver/dev/play/ractive-dropdown/source
 @ ./~/css-loader!./~/stylus-loader!./source/styles.styl 6:310-353

Any help ?

raulghm commented 8 years ago

Hi, you need use in this order:

$fa-font-path = '/node_modules/font-awesome-stylus/fonts' @import '../../node_modules/font-awesome-stylus/stylus/index.styl'

I hope to be helpful!