cscan / vue-excel-editor

Vue2 plugin for displaying and editing the array-of-object in Excel style
MIT License
557 stars 107 forks source link

no default exports in vuedraggable and xlsx.js #136

Open danielKugler opened 9 months ago

danielKugler commented 9 months ago

While changing to vite with a vue2 project we are now getting errors.

Uncaught SyntaxError: The requested module '/node_modules/vuedraggable/dist/vuedraggable.umd.js?v=ef55e21c' does not provide an export named 'default' (at PanelSetting.vue:2:8)
Uncaught SyntaxError: The requested module '/node_modules/xlsx/xlsx.js?v=ef55e21c' does not provide an export named 'default' (at VueExcelEditor.vue:7:8)

xlsx.js and vuedraggable seem to not provide default exports. Therefor imports have to be adjusted.

Could you please change the import in PanelSettings.vue

from: import draggable from 'vuedraggable' to: import * as draggable from 'vuedraggable'

AND in VueExcelEditor.vue

from: import XLSX from 'xlsx' to: import * as XLSX from 'xlsx'

cscan commented 8 months ago

Pls hange to use vue3-excel-editor.

在 2024年2月8日週四 23:43,danielKugler @.***> 寫道:

While changing to vite with a vue2 project we are now getting errors.

Uncaught SyntaxError: The requested module '/node_modules/vuedraggable/dist/vuedraggable.umd.js?v=ef55e21c' does not provide an export named 'default' (at PanelSetting.vue:2:8)

Uncaught SyntaxError: The requested module '/node_modules/xlsx/xlsx.js?v=ef55e21c' does not provide an export named 'default' (at VueExcelEditor.vue:7:8)

xlsx.js and vuedraggable seem to not provide default exports. Therefor imports have to be adjusted.

Could you please change the import in PanelSettings.vue

from: import draggable from 'vuedraggable' to: import as draggable from 'vuedraggable'*

AND in VueExcelEditor.vue

from: import XLSX from 'xlsx' to: import as XLSX from 'xlsx'*

— Reply to this email directly, view it on GitHub https://github.com/cscan/vue-excel-editor/issues/136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYSOFZD6AXQUDPWLGHPKKTYSTXBFAVCNFSM6AAAAABC77A4JKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDKNBYHEYTONQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

danielKugler commented 8 months ago

As i said, it is a vue2 project.