Lakshan-Madushanka / laravel-comments

Integrate seamless commenting functionality into your Laravel project
https://lakm.gitbook.io/commenter/
MIT License
217 stars 5 forks source link

Alpine Expression Error: message is not defined. #44

Closed bumpyy closed 3 days ago

bumpyy commented 4 days ago

Bug type

Commenter Version

2.0.3

Description

i have follow all step but got this error image

for context i need to do this in my js file image

Steps To Reproduce

see description

Reproduce URL

No response

Lakshan-Madushanka commented 4 days ago

@bumpyy I think you haven't included assets as instructed in https://lakm.gitbook.io/commenter/basics/usage#include-styles-in-your-layout and https://lakm.gitbook.io/commenter/basics/usage#include-scripts-in-your-layout

bumpyy commented 4 days ago

already did, image image

I'm using Laravel 10 btw, gonna try things out to see if it works

Lakshan-Madushanka commented 4 days ago

If the issue persists, please create a sample Git repository and share the link.

bumpyy commented 3 days ago

i'm using livewire 3, i think it's because i'm manually bundling livewire and alpine

sadly i need to do this to use alpine plugin.

bumpyy commented 3 days ago

Yup, it's the culprit.

Lakshan-Madushanka commented 3 days ago

Then load livewire and alpine before the commenter assets!

bumpyy commented 3 days ago

Sorry for the confusion, Using the blade directive will not work image

but we can import it directly in our js and css file js image

css image

this is working but will be a problem (more like a chore) if the file name changed. perhaps there's a better way?