Skip to content

problem in laravel-mix #304

@phpxtreme

Description

@phpxtreme

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions