vue-pdf-embed icon indicating copy to clipboard operation
vue-pdf-embed copied to clipboard

Implement Vue 2 support for v2.

Open gkweb opened this issue 1 year ago • 4 comments

Vue 2 support is still possible with some very very minor changes.

Are you open to supporting both?

I'd be happy to open a PR. This might see the folder structure change slightly to support both versions of Vue gracefully.

gkweb avatar Sep 17 '24 04:09 gkweb

Hi @gkweb,

Support for Vue 2 was not envisaged in v2, and frankly, I don't see a way to support both Vues in the current environment. If you do, I'd be happy to check out your PR.

hrynko avatar Sep 17 '24 13:09 hrynko

@hrynko - Rough proposal before I spend any time there. See detail and let me know your thoughts?

Workspaces set up in the repo

Vue 2 in workspace will sit in @vue-pdf-embed/vue2

And consumed when published to npm via vue-pdf-embed/vue2/* Vue 3 is consumed as normal under: vue-pdf-embed/*

proposed folder change:

  • packages/
    • core
      • @vue-pdf-embed/core
      • current project and associated ts / .vue
      • The ONLY minor change to the vue implementation is to switch out toValue to unref
      • Types - Look at adding a checked inMaybeRef (doesn't exist for vue 2).
    • vue2
      • @vue-pdf-embed/vue2
      • package.json
        • Will hold different Vue deps (vue 2) and vite build deps
        • will build output into packages/vue2/dist OR workspace root /dist/vue2 TBC

gkweb avatar Sep 17 '24 22:09 gkweb

Friendly bump of that proposal @hrynko - thoughts?

gkweb avatar Sep 26 '24 02:09 gkweb

Hi @gkweb,

Thanks for describing your suggestion. This approach is quite similar to what we used in v1, which, unfortunately, brought maintenance challenges over time. For now, I’m more inclined to refine v1 rather than returning to that structure.

I appreciate your input — it’s always helpful to get fresh perspectives!

hrynko avatar Nov 04 '24 08:11 hrynko