Skip to content

joyn-engineering/less-loader-with-js

 
 

Repository files navigation

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

About

Compiles Less to CSS

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%