wire-elements / spotlight

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

Fuse is not defined #45

Closed CristhoferMF closed 2 years ago

CristhoferMF commented 2 years ago

image

tnylea commented 2 years ago

Same on my end. I'll hit up @PhiloNL and see if he can help us out 😜

tnylea commented 2 years ago

Hey @CristhoferMF,

I got this fixed by including Fuse.js in my application package.json:

npm install --save fuse.js

Then, I just needed to include it in my app.js file:

import Fuse from 'fuse.js'
window.Fuse = Fuse;

After you re-build your javascript, it should be working 😉

PhiloNL commented 2 years ago

Hi @CristhoferMF & @tnylea Did you set include_js to false by any chance and used require('vendor/livewire-ui/spotlight/resources/js/spotlight'); instead?

If so, I think npm i fuse.js should fix the issue.

PhiloNL commented 2 years ago

Updated config and readme: https://github.com/livewire-ui/spotlight/commit/a3aaaf363e438934ccee9b8494856a0872384e80