change auto generated class names by next.js
Unanswered
Bigeye tuna posted this in #help-forum
Bigeye tunaOP
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
Bigeye tunaOP
i dont know what you mean
click the link
Bigeye tunaOP
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?
Bigeye tunaOP
because i do not like the current class names
Can I know which className are you referring to, like which auto generated one?
Bigeye tunaOP
this for example
@Bigeye tuna this for example
Can you share your code
Bigeye tunaOP
i havent tried to change it yet, because i dont know how
What is the current code of your file of the route?
Bigeye tunaOP
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]",
},
},
})@Anay-208 What is the current code of your file of the route?
Bigeye tunaOP
shouldnt matter
Bigeye tunaOP
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