STEP1: In console/terminal.
npm install --save sweetalert2
STEP2: In app.scss add this line...
@import '~sweetalert2/src/sweetalert2.scss';
STEP3: In app.js add this line...
const swal = require('sweetalert2');
STEP4: In webpack.min.js...
mix.setPublicPath('public');
mix.js('resources/js/app.js', 'js');
mix.sass('resources/sass/app.scss', 'css');
STEP5: npm run dev
STEP6: Add app.js and app.css to HTML document
I got this error:
Uncaught ReferenceError: swal is not defined
What's the missing step?