Are you using both Tailwind and Bootstrap in your project?
Tailwind automatically handles purging, you don't need external configuration, whereas Bootstrap follows a different approach.
I've installed PurgeCSS with Inertia-React and the login page is missing the style.
Regarding the issue with your login page, the original version uses Tailwind unless you've customized it with Bootstrap.
I don’t think you should include the css folder in the purge plugin's paths. The documentation examples don’t include it, so try removing it. Don't forget to include the .jsx extention in your paths. With these changes, your login page's styles should be back.
In addition, is there a way I can purge unused JS while building my assets?
For unused JavaScript files, start by identifying what can and can't be removed. Various online tools and npm packages can assist with this. Generally, modifying external packages isn't advisable, but you can chunk JavaScript files if needed.
Avoid importing everything in app.jsx unless absolutely necessary, and follow the good practices and recommandations from the official documentations and various online resources to install packages. For example, you can follow this tutorial to install Bootstrap.
If you already know a JavaScript package won’t be used, remove it from your codebase (package.json) and delete any related import statements in your files.
Here’s a list of useful resources for your use case: