It's possible that the lg:my-10 class is being purged by Tailwind during the production build. To fix this, you can add the class to the purge option in your tailwind.config.js file.
Here's an example of how to do this:
- Create a
tailwind.config.jsfile in the root of your project if you haven't already. - Add the following code to the file:
module.exports = {
purge: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
],
// ...other Tailwind options
}
- Add the
lg:my-10class to thepurgearray:
module.exports = {
purge: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
'./resources/**/*.css', // add this line
],
// ...other Tailwind options
}
- Rebuild your production assets with
npm run buildand check if thelg:my-10class is now included in the output CSS file.
If this doesn't work, you can try disabling the purge option entirely in your tailwind.config.js file:
module.exports = {
purge: false, // disable purge
// ...other Tailwind options
}
Note that disabling purge will increase the size of your CSS file, so it's not recommended for production use.