less.js icon indicating copy to clipboard operation
less.js copied to clipboard

RangeError: Maximum call stack size exceeded

Open looading opened this issue 3 years ago • 5 comments

https://github.com/less/less.js/blob/b37922cfb2932f00d1e8b340f4799ff24a2af0f2/packages/less/src/less/tree/ruleset.js#L238 Case: importRules might be a very large array, when use import Options multiple to import files which contains lots of mixins, Variable, CSS Guards and so on Error: image

looading avatar Apr 12 '21 10:04 looading

遇到了同样的问题,请问怎么解决的

LiuQingFu28 avatar Jun 04 '21 05:06 LiuQingFu28

遇到了同样的问题,请问怎么解决的 把上面的是实现方式修改一下,一次性改成批量塞数据

looading avatar Jun 04 '21 05:06 looading

Hi @looading ! Can you offer a reproducation online demo or github repo? I think it's optimization question.

iChenLei avatar Jun 16 '21 07:06 iChenLei

Hi

We are having same issue when applying (multiple ) to any import using antd example to crash

body[data-theme="light"] {
  @import "antd/dist/antd.less";
  @primary-color: blue;
}

body[data-theme="dark"] {
  @import (multiple) "antd/dist/antd.less";
  @primary-color: red;
}

repo link: https://codesandbox.io/s/antd-less-example-less-js-bug-y2tiqp?file=/src/app.less:0-182

maybe realted to: https://github.com/less/less.js/issues/1928

hugobarragon avatar Mar 22 '23 13:03 hugobarragon

Is this possibly a circular import?

matthew-dean avatar Mar 25 '23 22:03 matthew-dean