coreui-vue icon indicating copy to clipboard operation
coreui-vue copied to clipboard

CFormInput.ts fails on SSR (server side rendering) due to undefined type "File"

Open digital-codes opened this issue 3 years ago • 0 comments

  • OS: Linux, Fedora 35
  • Browser: Firefox 104.0.1
  • Test case:
  • well, don't quite know how to fix this, description instead: https://github.com/coreui/coreui-vue/blob/main/packages/coreui-vue/src/components/form/CFormInput.ts defines:
/**
     * The default name for a value passed using v-model.
     */
    modelValue: {
      type: [File, Number, String],
      default: undefined,
    },

However, the type "File" only exists in a browser environment, but not in nodejs on a server. Therefore, bundling an universal app with vite or webpack fail at this point. I removed the "File" type option as a workaround, but this is not very convenient.... Don't know what a better fix could be ...

digital-codes avatar Sep 05 '22 14:09 digital-codes