Less Loader Options: In the second configuration, lessLoaderOptions object has been removed from the parameters of the withLess function, and instead, directly specified within the lessLoader object. Additionally, a modification is made to lessOptions to include a modifyVars option, which defines custom variables for Less compilation.
Multiple SASS Module Rules Handling: Instead of handling a single SASS module rule as in the first configuration, the second configuration accounts for multiple SASS module rules by iterating through all the rules found in the webpack configuration and filtering them based on their test sources.
Support for next-flight-css-loader: The second configuration includes handling for rules using next-flight-css-loader, adding support for processing Less in such scenarios.
Support Next 14.0
Less Loader Options: In the second configuration, lessLoaderOptions object has been removed from the parameters of the withLess function, and instead, directly specified within the lessLoader object. Additionally, a modification is made to lessOptions to include a modifyVars option, which defines custom variables for Less compilation.
Multiple SASS Module Rules Handling: Instead of handling a single SASS module rule as in the first configuration, the second configuration accounts for multiple SASS module rules by iterating through all the rules found in the webpack configuration and filtering them based on their test sources.
Support for next-flight-css-loader: The second configuration includes handling for rules using next-flight-css-loader, adding support for processing Less in such scenarios.