elado / next-with-less

Next.js + Less CSS Support
MIT License
143 stars 24 forks source link

Support Next 14.0 #40

Closed SouthLink closed 3 months ago

SouthLink commented 3 months ago

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.

SouthLink commented 3 months ago

Use less alone in the app folder, there will be some problems, temporarily closed