nuxt/framework

vue-easytable does not provide an export named 'default'

BITRU opened this issue · 1 comments

BITRU commented

Environment


  • Operating System: Darwin
  • Node Version: v18.6.0
  • Nuxt Version: 3.0.0-rc.6
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: modules, runtimeConfig, unocss, experimental, css, build, colorMode
  • Runtime Modules: @pinia/nuxt@0.3.1, @vueuse/nuxt@8.9.4, @unocss/nuxt@0.44.7, @nuxtjs/supabase@0.1.19, @nuxtjs/color-mode@3.1.4
  • Build Modules: -

Reproduction

yarn add vue-easytable

plugins/vue-easytable.client.ts - if not .client will fail

import VueEasytable from 'vue-easytable'
export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueEasytable)
})
defineNuxtConfig({  build: {
    transpile: ['vue-easytable'],
  },})

Describe the bug

fail to run with error

Uncaught SyntaxError: The requested module '/_nuxt/node_modules/vue-easytable/libs/main.js?v=e7b2d731' does not provide an export named 'default' (at vue-easytable.client.ts:1:1)

Additional context

No response

Logs

No response

Looks like you might also need to add to vite.optimizeDeps.include: https://vitejs.dev/config/dep-optimization-options.html#optimizedeps-include.