How do I use javascript/jquery plugins in Laravel?

Posted 11 months ago by p0t4t0

Hello, I'm not quite sure if I'm doing this right but in my /resources/assets/js/app.js file I tried importing this plugin I just installed with npm but it isn't working

require('../../../node_modules/nanobar/nanobar');

and in my view I have

<script type="text/javascript">
      var nanobar = new Nanobar({
        classname: 'nanobar'
      });
</script>

it's saying that Nanobar isn't defined

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.