Make sure your vite version is 3 or higher. Supports using the 'beforeInjectCss' hook to customize the return of your CSS code, such as in cases where a custom CDN domain exists. Since Vite vite:build ...
To add CSS externally to HTML, we need to create a separate CSS file in which we will write styles and then link that .css file with respective .html file. So here ...