Closed JounQin closed 7 years ago
This issue is related to #121
@JounQin, the stylus
has the -I
(Include) option to add the bootstrap-styl
to lookup paths:
stylus --help 2>&1 | grep '\-I'`
-I, --include <path> Add <path> to lookup paths
It may be used like this:
# compile the $baseAbsDirPath/css/main.styl to the $baseAbsDirPath/css/main.css
cd $baseAbsDirPath/css && stylus -I $baseAbsDirPath/node_modules/bootstrap-styl -c --disable-cache < main.styl > main.css
The contents of the $baseAbsDirPath/css/main.styl:
@require "../node_modules/bootstrap-styl/bootstrap/index"
@require "../node_modules/bootstrap-styl/bootstrap/theme"
Probably webpack has some setting for that too.
Just use paths
param of stylus-loader
, if you're using sourcemap, you should use absolute path not just node_modules/bootstrap-styl
.
The relative path in
index.styl
are all likebootstrap/*.styl
, butindex.styl
itself is underbootstrap
directory, so how could it resolve them properly?Might it be the reason that webpack could not resolve the dependent styles? #122