change auto generated class names by next.js
Unanswered
Narrow-barred Spanish mackerel posted this in #help-forum
Narrow-barred Spanish mackerelOP
how can i change the auto generated class names by next.js?
18 Replies
I think its a xy question.
https://xyproblem.info
https://xyproblem.info
Narrow-barred Spanish mackerelOP
i dont know what you mean
click the link
Narrow-barred Spanish mackerelOP
i am not asking about any attempted solution
i am asking how to change the auto generated class names by next.js
Why do you want to do it?
Narrow-barred Spanish mackerelOP
because i do not like the current class names
Can I know which className are you referring to, like which auto generated one?
Narrow-barred Spanish mackerelOP
this for example
Can you share your code
Narrow-barred Spanish mackerelOP
i havent tried to change it yet, because i dont know how
What is the current code of your file of the route?
Narrow-barred Spanish mackerelOP
well, i tried but it does not add the new classnames to the html elements
config.module.rules.push( {
test: /\.css$/i,
loader: "css-loader",
options: {
modules: {
localIdentName: "[hash:base64]",
},
},
})
shouldnt matter
Narrow-barred Spanish mackerelOP
this is just a normal module css name,
{styles.landingPage}
Thats how the
It is supposed to generate a random style, so it doesn't clash with another one.
You can just use
file.module.css
is built.It is supposed to generate a random style, so it doesn't clash with another one.
You can just use
import "styles.css"
as far as I know, there is no way to change this with your approach