wire-elements / spotlight

Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.
MIT License
927 stars 72 forks source link

Styling weird when running `npm run prod` #24

Closed Braunson closed 3 years ago

Braunson commented 3 years ago

I'm already using Tailwind on a project so the config is set to false to include Tailwind. However when I run npm run dev and open Spotlight, it looks fine (the black popup, aligned center, etc).

It's when I run npm run prod is when the styles and positioning get funky. Here's what it looks like (aligned to the top of the page)

image

PhiloNL commented 3 years ago

Hi @Braunson, My guess is that the CSS classes are purged. You can fix this by including the view in the purge section:

module.exports = {
    purge: [
        './vendor/livewire-ui/modal/resources/views/*.blade.php',
        './storage/framework/views/*.php',
        './resources/views/**/*.blade.php',
    ],
}

Let me know if that works 😄

Braunson commented 3 years ago

@PhiloNL Works, thank you!