adchsm / Slidebars

Slidebars is a jQuery Framework for Off-Canvas Menus and Sidebars into your website or web app.

Home Page:http://www.adchsm.com/slidebars/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

problem in laravel-mix

phpxtreme opened this issue · comments

I'm trying to import this library to my project in laravel. have installed with NPM:

npm install slidebars --save-dev

Then I'm trying to import this library to my app.js file which has the following structure:

import jquery from 'jquery';
import popper from "popper.js";

try {
    window.$ = window.jQuery = jquery;
    window.Popper = popper.default;

    require('bootstrap');
    require('slidebars');

} catch (exception) {
    console.log(exception);
}

$(document).ready(function () {
    let constructor = new slidebars();
});

run npm run watch but then in my browser I get the following error in the console:

ReferenceError: slidebars is not defined

Please, if you could help me, I have searched in different places, but I can not find a solution for it. Thank you very much in advance.

See #240
It's looks like the author @adchsm isn't active anymore so this PR is still open but it will probably fix your issue.