Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do away with import ordering restrictions #371

Closed
arshaw opened this issue Jun 10, 2021 · 2 comments
Closed

do away with import ordering restrictions #371

arshaw opened this issue Jun 10, 2021 · 2 comments
Milestone

Comments

@arshaw
Copy link
Member

arshaw commented Jun 10, 2021

The FullCalendar Angular docs require that the @fullcalendar/angular package go before any other fullcalendar-related package. Otherwise you'll get a JS error like Please import the top-level fullcalendar lib before attempting to import a plugin. Example configuration:

import { FullCalendarModule } from '@fullcalendar/angular'; // the main connector. must go first
import dayGridPlugin from '@fullcalendar/daygrid'; // a plugin
import interactionPlugin from '@fullcalendar/interaction'; // a plugin

Also, the registerPlugins exists for a similar reason: to prevent the .component.ts file from importing its own plugin files, which might violate the ordering. Example:

FullCalendarModule.registerPlugins([ // register FullCalendar plugins
  dayGridPlugin,
  interactionPlugin
]);

It would be great to do away with this ordering restriction as well as registerPlugins. For an explanation of why this ordering restriction exists in the first place, see fullcalendar/fullcalendar#6371

@Dorus
Copy link

Dorus commented Aug 4, 2022

When VSCode Organize imports breaks your build because bootstrap5Plugin goes before Calendar alphabetically...

@arshaw arshaw added this to the v6 milestone Dec 9, 2022
@arshaw
Copy link
Member Author

arshaw commented Dec 15, 2022

This is fixed in v6.0.0

@arshaw arshaw closed this as completed Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants