What is the best way to include a css file (maybe sass compiled by webpack) inside a livewire view? Currently I’m doing this in my livewire blade view:
@push('styles')
{!! css('signup.css') !!}
@endpush
<div>
.... here is my livewire blade code
</div>
Above snippet uses a custom function I wrote:
if (!function_exists(‘css’)) {
function css($relativePath) {
return ‘<link href="’ . asset(“css/”.$relativePath) . ‘" rel=“stylesheet”>’;
}
}
Is there a better way to do this?