Standard-minifiers and .less includes

Hi,

switched to meteor v1.2 and now my less includes doesn’t work.

Old code was:

@include "../framework/bootstrap3/custom.bootstrap.less"

(included file is located in /client/styles/framework/bootstrap3/custom.bootstrap.less, and file that includes it is located in /client/styles/styles/styles.less)

Now, what is correct path to include this file? Path is now relative to what?

Thanks!
Petar

have you read this

To answer my own question: path is good, but I included .less instead .import.less.

And error was:

   While processing files with less (for target web.browser):
   client/styles/styles/styles.less:1: Unknown import:
   ../framework/bootstrap3/custom.bootstrap.less

Having the same issue. Read the breaking changes doc but its confusing. Where you able to find a fix for this.

Also, I don’t think less support a @include keyword. I might be wrong but I’m having the same issue on @import.

It’s @import in my code, but I made typo while writing this post.

@emmanuelbuah see my previous post - problem was importing .less file instead .import.less - it looks like it’s not supported anymore.

However, I still got problems with css - no more errors, but when I @import theme, it doesn’t work properly (looks like order of files - like theme is included before default bootstrap in resulting css).

:frowning:

Its a bug or by design. It looks like @import with a path other than the current location of the executing file throws an exception.

Just to add one more thing in case someone have the same problem:

You can @import any file by specifying path relative to application root by using empty curly braces:

@import "{}/client/styles/framework/bootstrap3/custom.bootstrap.less"

(source: https://atmospherejs.com/meteor/less )

And… that’s final solution for my problem.

does anyone have imports from a dot folder in the root? I have several assets in a “.build” folder in the root to have it ignored for autocompiling. with meteor 1.2 I can not include those anymore - used to work though.

neither of those seem to accomplish that:

import "/.build/styles.less"
import "{}/.build/styles.less"

as soon as I rename .build to build it works, but that would cause alle the sources in there to be compiled, no?