Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem in laravel-mix #304

Open
phpxtreme opened this issue Apr 15, 2019 · 1 comment
Open

problem in laravel-mix #304

phpxtreme opened this issue Apr 15, 2019 · 1 comment

Comments

@phpxtreme
Copy link

phpxtreme commented Apr 15, 2019

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.

@phpxtreme phpxtreme changed the title laravel-mix import a library problem in laravel-mix Apr 15, 2019
@JoryHogeveen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants