icai / vue3-calendar

vue 2.x vue 3.x calendar component
https://icai.github.io/vue3-calendar/
MIT License
494 stars 89 forks source link

Calendar component can't be loaded on IE browsers #37

Closed tigerclaw-az closed 10 months ago

tigerclaw-az commented 6 years ago

I have a SFC called InputDatePicker.vue that imports the calendar component:

import Calendar from 'vue2-slot-calendar';

export default {
    name: 'InputDatePicker',
    components: {
        calendar: Calendar,
    },
        ...
}

This will throw an error on Internet Explorer browsers due to the untranspiled JS inside the Calendar.vue file from node_modules.

I tried configuring the component with

import Calendar from 'vue2-slot-calendar';
Vue.component('calendar', Calendar);

but that completely broke and the application never loaded.

I believe you need to setup the library so it can be included as a "plugin": https://vuejs.org/v2/cookbook/packaging-sfc-for-npm.html