2

I am trying to begin using Browserify in a project but I am a bit confused how to actually use plugins that are imported into my script using require().

Specifically, I am trying to use the fullCalendar plugin -

var fullCalendar = require('fullcalendar')
$(document).ready(function() {
    $("#calendar").fullCalendar({});
});

When this loads, I get an error that fullCalendar is not defined. If you import a jQuery plugin using this method is it then called differently? If so, how?

I am using Laravel Elixir (gulp).

1 Answer 1

1

Try this:

global.$ = require('jquery'); // or global.jQuery
require('fullcalendar');

See this for more information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.