Coder Social home page Coder Social logo

Comments (7)

csoutham avatar csoutham commented on June 1, 2024 3

@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.

usernotnull avatar usernotnull commented on June 1, 2024 3

@csoutham thanks for pitching in!

from tall-toasts.

sawirricardo avatar sawirricardo commented on June 1, 2024 2

@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.

RikoDEV avatar RikoDEV commented on June 1, 2024 1

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.

image
image
image

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.

timgavin avatar timgavin commented on June 1, 2024 1

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.

jeffwhansen avatar jeffwhansen commented on June 1, 2024 1

PR to update README has been merged into main.

from tall-toasts.

usernotnull avatar usernotnull commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.