less-loader-with-js
v7.0.3
Published
A Less loader for webpack. Compiles Less to CSS. Has javascript option enabled by default
Downloads
5
Maintainers
Readme
less-loader-with-js
This is a fork of the official less-loader package. The difference is that here javascript is enabled by default so you don't need to pass this option to enable it. Reason for doing so was to add javascript support for the following import: import '!style-loader!css-loader!less-loader-with-js!./style.less';
.
Only change done is to add javascriptEnabled: true
inside of the getLessOptions
function to utils.js
.
const lessOptions = {
plugins: [],
relativeUrls: true,
// We need to set the filename because otherwise our WebpackFileManager will receive an undefined path for the entry
filename: loaderContext.resourcePath,
// this line was added
javascriptEnabled: true,
...options,
};