Skip to content

NextJS/React: Is there way/tool to combine classes into single obfuscated after build? #15541

Answered by dvzrd
fakeman2332 asked this question in Help
Discussion options

You must be logged in to vote

If you have scoped styles using css/sass modules you can achieve this pretty easily just by enabling style modules during your build process using postcss (or a similar build tool) - this would require you to have a separate stylesheet and you will need to create classes to apply those utilities to (which you probably don't want). If you're talking about inline html classes then you will need to create your own build script that processes the tailwind utility classes into unique class ids. You won't get this out the box with next and tailwind, need to go low level with your build scripts and use a combination of build tools.

I guess I would have to ask what reason do you have for doing th…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@fakeman2332
Comment options

@fakeman2332
Comment options

@dvzrd
Comment options

Answer selected by fakeman2332
@fakeman2332
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants