transitive-bullshit / create-react-library

CLI for creating reusable react libraries.
https://transitivebullsh.it/javascript-dev-tools-in-2022
4.78k stars 300 forks source link

Problem with fullcalendar and rrule #132

Closed danydhondt closed 5 years ago

danydhondt commented 5 years ago

The starting point for this problem is that I want to integrate fullcalendar v4 into a library I created with create-react-library

Integrating fullcalendarinto my library is not the problem, but integrating it with the rruleplugin is.

To get a grasp of what I want to achieve, I created an example with create-react-app which works as expected. You can view this in codesandbox As you will see, in the calendar, recurring events are rendered as expected.

Now, I've created exactly the same calendar example in my library. I can't make a sandbox of this one because codesandbox doesn't have a template (yet?) for create-react-library so I've published my project on github

If you run the example, you'll get this error:

TypeError: Cannot read property 'WEEKLY' of undefined
convertConstant
/Volumes/Macintosh HD SSD/Documenten/ARTEVELDE/MEDIATHEEK/MEDIATHEEK BACK OFFICE/bo2/fullcalendar-demo/dist/index.es.js:12028
12025 | }
12026 | function convertConstant(input) {
12027 |     if (typeof input === 'string') {
> 12028 |         return rrule$$1.RRule[input.toUpperCase()];
12029 |     }
12030 |     return input;
12031 | }

I think it has to do with the rollup config but I have no idea what to do.

Any help appreciated

transitive-bullshit commented 5 years ago

Really not sure what the issue might be and unfortunately don't have time to debug.

Closing for now, but please feel free to reopen if you make any progress.

Thanks!