7.0.3 • Published 4 years ago

less-loader-with-js v7.0.3

Weekly downloads
52
License
MIT
Repository
github
Last release
4 years ago

npm node deps tests cover chat size

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,
  };