I am trying to include a react-big-calendar in my webpage (https://openbase.com/js/react-big-calendar). All of the examples I have seen have it outputting to index.html, but I am trying to get it added to an existing jsp page I have. I have seen examples of adding react components to html pages using the tag and document.querySelector(), but my issue is that when I paste
import { Calendar, momentLocalizer } from 'react-big-calendar'
import moment from 'moment'
const localizer = momentLocalizer(moment)
const MyCalendar = props => (
<div>
<Calendar
localizer={localizer}
events={myEventsList}
startAccessor="start"
endAccessor="end"
style={{ height: 500 }}
/>
</div>
)
into a js file and include it as a script, it says "Cannot use import statement outside a module." How do I get this component added to my webpage?