less-loader
less-loader copied to clipboard
Less Loader Build Failure Due to Unrecognised Input
Description: I am encountering a build failure when using the less-loader in my project. The error message points to an unrecognized input in my LESS file. Here are the details:
Error Message:
When I run my webpack build process, it fails with the aforementioned error. Expected Behavior: The build process should compile the LESS file successfully without errors.
Actual Behavior: The build fails, indicating an unrecognized input at the specified line and character.
Additional Information:
Node.js version: v20.10.0 "less": "^3.0.4", "less-loader": "^4.1.0", "webpack": "^4.32.2", Webpack configuration related to less-loader:
{
test: /.less$/,
exclude: /\.module\.less$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[local]'
}
},
'postcss-loader',
{
loader: 'less-loader',
options: {
javascriptEnabled: true
}
}
]
}
I suspect that the 0.9 ![1,4] part is causing the issue as it is not valid LESS syntax. Could this be a typo or unsupported syntax? Any help would be greatly appreciated.
font-size: 9rem ![1,4]; // success
font-size: 0.9rem ![1,4]; // fail
Thank you!