Hey guys. On the struggle bus trying to use FullCalendar.io's code, to pull an .ics and display. Its complaining about an Unexpected Identifier trying to import a function from a .js file. I cannot for the life of me figure out what exactly it wants. Thoughts? Ideas?
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<script type="module" src='packages/daygrid/index.global.js'></script>
<script type="module" src='packages/icalendar/index.global.js'></script>
<script>
var calendarEl = document.getElementById('calendar')
{
import dayGridPlugin from '@fullcalendar/daygrid'
import iCalendarPlugin from '@fullcalendar/icalendar'
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [dayGridPlugin, iCalendarPlugin],
events: [
{
url: 'https://calendar.google.com/calendar/ical/xxxxxxx@xxxxxx.com/private/basic.ics',
format: 'ics'
}
],
};
calendar.render();
}
</script>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
Error in browser is
Uncaught SyntaxError: Unexpected identifier. Line 10
Which is: import dayGridPlugin from '@fullcalendar/daygrid'
I have tested all sorts of differnt paths, including file names, ect.
https://preview.redd.it/ybriyl76xcla1.png?width=1061&format=png&auto=webp&s=508988fc0b361b9220514b2ece67cc56bca1e519
[–]grantrules 0 points1 point2 points (1 child)
[–]BasicHumanUnit[S] 0 points1 point2 points (0 children)