LowerRockLabs / LaravelLivewireTablesAdvancedFilters

Advanced filters for Rappasoft Laravel Livewire Tables
8 stars 0 forks source link

How to install flatpickr correctly on Laravel 10, vite. #72

Open rhonautix opened 1 year ago

rhonautix commented 1 year ago

I'm getting Uncaught ReferenceError: flatpickr is not defined. I've already installed flatpickr using npn.

npm i flatpickr --save

I've added import flatpickr from 'flatpickr'; to my vite.config.js

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import flatpickr from 'flatpickr';

I'm not sure if this is the right way to install.

lrljoe commented 1 year ago

Apologies that I didn't see this sooner, are you still having issues?

You should be adding any additional NodeJS packages that are used throughout your project to your app.js file ideally.

If you're not running a VIte Dev server, or are in a production environment, make sure to run "npm run build" to generate the built files correctly.