Closed Zebzhong closed 1 year ago
To reproduce:
const less = require("less"); let lessStr = ` @color1: 'blue'; @imgUrl: ''; @furl: 'https://qq.com'; body{ color: @color1; } .myImg { background: url('@{imgUrl}') no-repeat; background-size: contain; width: 200px; height: 200px; } @font-face { font-family: 'zbtest'; src: "url('@{furl}')"; } .root { font-family: 'zbtest'; } ` less .render(lessStr, { modifyVars: { color1: 'skyblue', imgUrl: '../test/qe.png', furl: "https://www.baidu.com" }, }) .then((res) => { console.log(res); });
Current behavior:
Expected behavior:
Can replace externals url variables correctly, Thanks
Environment information:
less
nodejs
operating system
Duplicatehttps://github.com/less/less.js/issues/2372
To reproduce:
Current behavior:
Expected behavior:
Can replace externals url variables correctly, Thanks
Environment information:
less
version: 4.1.3nodejs
version: 14.xoperating system
: windows 10