I'm implementing a Ttailwind theme, but I'm with some doubts about the correct way to call some .css and .js that I install in package.json.
In my layout I will have
@vite(['resources/css/app.css', 'resources/js/app.js'])
The app.css have all the css in most pages but in some pages I will need some extra .css and .js specific for that page, this files are known extensions for example like tiny-slider.js and tiny-slider.css, I have it installed via package.json, what is the correct way to use this in a view?
Using laravel Mix I usually publish that assets to the public folder then in the view I call something like this:
<link href="{{ asset('/assets/tiny-slider/dist/tiny-slider.css') }}" rel="stylesheet">
<script src="{{ asset('/assets/tiny-slider/dist/min/tiny-slider.js') }}"></script>
But using vite I don't know how to do something similar, in most examples the tiny-slider (or other plugin) is included in app.js or app.css but in this case it will be present in all pages and I want to use it only where is needed.
Can someone explain me how can I do this correctly.