#change classname generation css-loader
1 messages · Page 1 of 1 (latest)
Based on the information provided in the extracts, there's a discussion about changing the classname generation with css-loader in a next.config.js file. However, the specific code to achieve this is not fully provided in the extracts.
Here's a partial example from the extracts:
module.exports = {
webpack: (config) => {
const rules = config.module.rules
.find((rule) => typeof rule.oneOf === "object")
.oneOf.filter((rule) => Array.isArray(rule.use));
rules.forEach((rule) => {
rule.use.forEach((moduleLoader) => {
if (
moduleLoader.loader !== undefined &&
moduleLoader.loader.includes("css-loader") &&
This code is finding the rules in the webpack configuration that use css-loader. However, the rest of the code that would actually change the classname generation is not included in the extracts.
Please note that modifying the webpack configuration in Next.js should be done with caution, as it can have unintended side effects and may break with major releases.
For more detailed and specific guidance, you may want to refer to the official css-loader and Next.js documentation or ask in their respective communities.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@bleak oasis kapa.ai is still learning and improving, please let us know how it did by reacting below
Let me check the knowledge base for you. One moment! :books:
I'm sorry for the confusion, but the provided extracts do not contain the complete code or specific instructions on how to change the classname generation with css-loader in your next.config.js file.