Comments (7)
@sawirricardo I had this issue too and looking at the source, the fix is to use the code from resources/js.
import ToastComponent from '../../vendor/usernotnull/tall-toasts/resources/js/tall-toasts';
This will compile correctly using Vite.
from tall-toasts.
@csoutham thanks for pitching in!
from tall-toasts.
@sawirricardo I had this issue too and looking at the source, the fix is to use the code from resources/js.
import ToastComponent from '../../vendor/usernotnull/tall-toasts/resources/js/tall-toasts';
This will compile correctly using Vite.
Thanks, it works!
from tall-toasts.
The @csoutham solution works only partially for me. Build passes, however when launching the application it shows a livewire related error which is not present in laravel-mix. Update: @toastScripts
tag before @vite(['resources/css/app.css', 'resources/js/app.js'])
without importing tall-toasts in app.js works as expected.
app.js
import './bootstrap'
import Alpine from 'alpinejs'
import ToastComponent from '../../vendor/usernotnull/tall-toasts/resources/js/tall-toasts';
Alpine.data('ToastComponent', ToastComponent)
window.Alpine = Alpine;
Alpine.start();
from tall-toasts.
I recommend putting something in the readme regarding this issue. I have a new build with Vite and encountered this issue. Took some digging to find that @csoutham 's solution fixed it. Thanks!
from tall-toasts.
PR to update README has been merged into main.
from tall-toasts.
I'm open for PRs to update README, since I can't test using Vite. My line of work temporarily changed and not coding ATM.
from tall-toasts.
Related Issues (20)
- Add RTL support HOT 4
- Toasts appear and disappear quick HOT 2
- unable to find livewire component toast HOT 1
- Tall Toasts did not work in my production HOT 17
- toast is not showed up when called from livewire mount() HOT 2
- Toast is not defined!
- Laravel 10 support HOT 4
- toasts array is not cleaned HOT 1
- JS Notification: no duration for danger HOT 2
- Paddings are in main div HOT 2
- Livewire v3 support HOT 2
- "->push()" not working on backend livewire component. HOT 10
- Unable to call component method. Public method [data] not found on component HOT 1
- toast wont appear until there's refresh HOT 4
- Adding PHPDoc for Facade so ide-helper works HOT 4
- Assertion that toast was called (with options?) HOT 3
- Getting the toast only after I refresh the page! HOT 3
- Laravel11 support HOT 4
- Laravel 9 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tall-toasts.