Error when using css variables without semi.
Hey,I found it will parse error when I import a css like this:
import './test.css'
// test.css
.test {
--animate-margin-top: -30px;
--animate-transform-vertical: top
}
the error detail is:
ERROR in ./src/test.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
--animate-transform-vertical: top
}
Unrecognised input. Possibly missing opening '{'
......
I know it's not a good idea to leave CSS without a semicolon at the end,but it is normal in the [email protected] version,so it kind of confused me.
Confirmed.
This likely won't be addressed until Less 4.
Still not good?
Hello,
The issue is still happening in version [email protected].
As @HQ-Lin commented, it happens when you have a variable without semi colon at the end of the block.
This can be fixed by adding the semi colon if you are the owner of the code, but in case of a third-party library it is not viable.
I am using lessc file.less --clean-css="--s1 --advanced" to minify some files that later are used in other projects.