$(...).fullCalendar is not a function - Webpack

Sim*_*mon 5 javascript jquery fullcalendar webpack

When I try to load the calendar the webpack compiler does not seem to recognize jquery is being used? I am following the basic usage guide

I assume because full calendar has jquery bundled in already I do not need to call it.

In my app.js I am calling fullCalendar via

import fullCalendar from 'fullCalendar';
const calendar = document.getElementById('calendar');

$(calendar).fullCalendar();
Run Code Online (Sandbox Code Playgroud)

I know I am doing something wrong and I could not find any import methods inside the full calendar docs.

Nie*_*eek 0

1)通过npm安装(npm install fullcalendar --save-dev

2)在webpack.config.js中有以下内容

module.exports = {
    entry: [
        'fullcalendar',
        ...
   ]
}
Run Code Online (Sandbox Code Playgroud)

3)在你的JavaScript中

require("fullcalendar"); //maybe import works as well
$calendar.fullCalendar();
Run Code Online (Sandbox Code Playgroud)