maxmx / bootstrap-stylus

Port of Bootstrap to Stylus
MIT License
585 stars 113 forks source link

Gliphicons not found #102

Closed OAGr closed 9 years ago

OAGr commented 9 years ago

I'm using Webpack, so attempted to include this bootstrap in a stylus file.

@import '../../node_modules/bootstrap-styl/stylus/bootstrap'

Error:


ERROR in ./~/css-loader!./~/postcss-loader!./~/stylus-loader!./src/css/main.styl
Module not found: Error: Cannot resolve 'file' or 'directory' ../fonts/glyphicons-halflings-regular.eot in /Users/foobar/guesstimate/src/css
 @ ./~/css-loader!./~/postcss-loader!./~/stylus-loader!./src/css/main.styl 6:4136-4188 6:4211-4263

When I attempt to import bootstrap directly (@import 'bootstrap') it fails to locate the file.

Code here: https://github.com/OAGr/guesstimate/blob/3a97afb32e19efb2c0937a6ee4a07f796905bbbe/src/css/main.styl

I was able to fix this by commenting out the @import glyphicons in the bootstrap.styl file, but this is obviously a hack.

kane-c commented 9 years ago

I haven't tried using this with Webpack yet, but you might just need to override the font path variable.

Something like this:

$icon-font-path = ../../node_modules/bootstrap-styl/fonts
OAGr commented 9 years ago

$icon-font-path = ../../node_modules/bootstrap-styl/fonts/ did it (with a slash at the end). Thanks!

Full code: main.style

$icon-font-path = '../../node_modules/bootstrap-styl/fonts/'
@import '../../node_modules/bootstrap-styl/stylus/bootstrap'

Feel free to close.