question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Distribute a version of FullCalendar with all plugins

See original GitHub issue

@toxpal raises a good point about how annoying it is to need to load many different plugin files, whereas in v4 only 1 JS and CSS file were required. Users of a Webkit/Rollup build environment probably appreciate the division into plugins, because their build environment does the bundling for them, and they can save on filesize, but for people who initialize via script tags and browser globals, this can definitely be annoying.

Something that is annoying for users of both techniques is that they need to manually include all required CSS files. This low-tech solution was decided in this issue.

Something else that doesn’t make a whole lot of sense is how the plugin files are used from a CDN (see the “CDN” section on the Downloads page). The whole reason people use CDNs is to make their sites load faster, but if they need to load each individual plugin files (both JS and CSS), it sort of defeats the point. They could end up with ~8 requests.

What I’m getting at is… maybe we should offer a build of FullCalendar that includes ALL of the plugins by default. It wouldn’t be necessary to feed them into the plugins array. Everything would just work. Of course, this single JS/CSS would be larger.

I’m not exactly sure how this would work with Scheduler’s plugins.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Barthelewaycommented, Mar 12, 2021

Hi @ppazos, I was trying the same as you so here is my solution. I feel it’s not really best one ever but at least it’s working. @iiibbbmmm the aim is to have a custom build to integrate as a script tag. Fullcalendar.io only provide full plugins build and in order to optimize loading time, it’s great to be able to have a custom build that fits to our particular needs.

  1. Take the Webpack example
  2. Replace the content of src/main.js by :
import { Calendar } from '@fullcalendar/core';
import allLocales from '@fullcalendar/core/locales-all';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';

(function (global) {
  global.FullCalendar = {
    Calendar: function (elt, options) {
      return new Calendar(elt, Object.assign({
        plugins: [ dayGridPlugin, timeGridPlugin ],
        locales: allLocales,
      }, options))
    }
  }
})(window);
  1. Build the project using yarn run build (or npm equivalent)
  2. Take the file from dist/main.js, and integrate to your website
  3. Depending on what plugins you need, add them in package.json and src/main.js

Note: If you need a minified version, edit webpack.config.js and change mode: 'production'.

1reaction
arshawcommented, Apr 1, 2020

hi @steelbrain , a beta will definitely be coming out on Monday (apr 6). sorry about the delay

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docs Premium Plugins
FullCalendar Premium (also known as “FullCalendar Scheduler”) is a collection of plugins released under a different license than the standard plugins.
Read more >
Premium Plugins - Docs v4 | FullCalendar
FullCalendar “Scheduler” is the name for a collection of premium plugins. There are currently two distinct plugins that provide new views, both of...
Read more >
V6 Release Notes and Upgrade Guide - Docs
Breaking: The fullcalendar and fullcalendar-scheduler packages no longer contain locale files. Instead, always use @fullcalendar/core : All ...
Read more >
Docs Plugin Index
Name Functionality / Views Yarn jsDelivr @fullcalendar/core Offers the Calendar class among other things Yarn jsDelivr @fullcalendar/adaptive Premium Offers improved printing support. Yarn jsDelivr @fullcalendar/bootstrap5 Offers...
Read more >
Getting Started - Docs
The simplest way to get started is with FullCalendar's pre-built bundles and <script> tags: ... For larger projects, it's best to use some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found