mkocansey / bladewind

BladewindUI is a collection of elegant Laravel blade-based UI components spiced with TailwindCSS and Javascript.
https://bladewindui.com
MIT License
508 stars 47 forks source link

"cdn.min.js:1 Alpine Expression Error: app is not defined" and tens of other errors #113

Closed GBry closed 1 year ago

GBry commented 1 year ago

My app template head: ` {{-- livewire --}} @livewireStyles {{-- wireui --}}

    @vite(['resources/css/app.css', 'resources/js/app.js'])    

{{-- livewire modal --}}
    <!-- Focus plugin -->
    <script defer src="https://unpkg.com/@alpinejs/focus@3.x.x/dist/cdn.min.js"></script>
{{-- bladewindui --}}
    <link href="{{ asset('vendor/bladewind/css/animate.min.css') }}" rel="stylesheet" />
    {{-- <link href="{{ asset('vendor/bladewind/css/bladewind-ui.min.css') }}" rel="stylesheet" /> --}}
    <script src="{{ asset('vendor/bladewind/js/helpers.js') }}"></script>`

My app.js

`/jshint esversion: 11 / import './bootstrap'; import Alpine from 'alpinejs'; import flatpickr from "flatpickr"; window.Alpine = Alpine; window.flatpickr = flatpickr;

import {livewire_hot_reload} from 'virtual:livewire-hot-reload';

import("./../../node_modules/flatpickr/dist/flatpickr.min.css");

import "./../../vendor/power-components/livewire-powergrid/dist/powergrid.css";

import SlimSelect from 'slim-select'; window.SlimSelect = SlimSelect; import './../../vendor/power-components/livewire-powergrid/dist/powergrid'; Alpine.start(); livewire_hot_reload();

` I'm using the datepicker inside a table inside a livewire component, livewire-ui-modal, which is called by a powergrid table.

I suspect the load order of the HEAD part of the template, but I'm really confused.

mkocansey commented 1 year ago

@GBry Is it possible to post all the other errors you're getting? Some errors down the stack might help figure out the Alpine related error. Apologies for the late response.

GBry commented 1 year ago

I forgot what I did to solve it, shall I close this as not planned?

mkocansey commented 1 year ago

@GBry I am closing this. Glad you found a way around the errors.