less-loader-with-js

7.0.3 • Public • Published

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

/less-loader-with-js/

    Package Sidebar

    Install

    npm i less-loader-with-js

    Weekly Downloads

    6

    Version

    7.0.3

    License

    MIT

    Unpacked Size

    28.4 kB

    Total Files

    9

    Last publish

    Collaborators

    • ofedotov