i try to work with less js and available string path in less with custom modifyvars code
available.less
@image-path : "/assets/images";
@bg-image : "/bg/01.png";
style.less
@import "available.less";
body{
background: url('@{image-path}@{bg-image}') repeat top left;
}
in javascript
less.modifyVars({
'@bg-image' : "/bg/08.png"
});
i get error ParseError: Unrecognised input
@bg-image: /bg/08.png;
how to fix it
so if i change modifyVars to
less.modifyVars({
'@bg-image' : "'/bg/08.png'"
});
with value wrap in double quote + single qoute it work ! but i dont need this fix because modifyVars i'm get form html element by jquery