Closed emirotin closed 9 years ago
It also tries to separately build all individual less
files. So for example in main.less
I have
@import "section";
@import "footer";
and the footer.less
uses inheritance from a class defined in section.less
.
This works just fine when the main.less
is compiled, but fails when it tries to compile footer.less
alone.
Sample repo https://github.com/emirotin/ws-error
+:one: @emirotin I'm experiencing the same thing using Stylus @extend
It works in preview mode because the files are built on demand and you never request the footer directly. But in build mode all files are walked over and built. To fix it just add the offending files to your ignore list in config.json,
Sorry for the slow response..
Sorry it just doesn't make sense to me. There are no offending files. Check the sample repo linked above if you're interested
Check this https://github.com/emirotin/ws-error/pull/1
OK makes sense now. So when you say offensive you mean the files that are dependent and don't have to be compiled on their own. Thanks.
Yep, that's it. Also the LESS plugin is configured to ignore any file starting with underscore _
so you can just name your files like that and they will not be compiled individually
I have a Wintersmith project using LESS.
My
main.less
imports lots of small module files (and a couple of libraries installed through bower) and everything works just fine inpreview
mode.But it fails when I try to
build
the project.My
@import
s are relative and I havein
config.json
. It seems that relative imports are the source of the problem — if I reduce mymain.less
to a single line and change it fromimport "settings/settings";
toimport "contents/settings/settings";
it works (well, fails on a different file, but at least goes over this line).What really surprises me is that it still works in preview mode.
Is it something relatively easy to fix without replacing all imports in all my modules? Thanks in advance!