T
T
ThreegunD2017-09-14 09:58:09
Laravel
ThreegunD, 2017-09-14 09:58:09

Connecting laravel mix plugins?

Laravel 5.5
I'm trying to connect the "sweetalert2" plugin I did
"npm install --save sweetalert2"
In "assets/app.js" I wrote require('sweetalert2') I
ran npm run watch
I got a notification that everything was built.
When I try to display an example, it says "swal is not defined"
What am I doing wrong? And how do third-party plugins connect?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hakkol, 2017-09-14
@ThreegunD

var swal = require('sweetalert');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question