Skip to content

Conversation

ShGKme
Copy link
Collaborator

@ShGKme ShGKme commented Apr 4, 2025

Resolves

Makes the package compatible with both Vue 2 and Vue 3
Review is easier by commits.

How it works

vue-loader in a peer dependency allows both legacy and new vue-loader.

After installation in a postinstall this package:

  1. Checks if there is a compatible vue-loader for the installed vue
  2. If there isn't - it installs compatible vue-loader with --no-save as ghost dependency

Thus:

  • In Vue 3 apps - new vue-loader is installed by NPM
  • In Vue 2 apps with explicit legacy vue-loader dependency - it is also installed by NPM
  • In Vue 2 apps without explicit vue-loader dependency - this package installs vue-loader@legacy as a ghost dependency

@ShGKme ShGKme added the enhancement New feature or request label Apr 4, 2025
@ShGKme ShGKme self-assigned this Apr 4, 2025
@ShGKme ShGKme changed the title feat: vue2 and vue3 compatibility feat: Vue 2 and Vue 3 compatibility Apr 4, 2025
@ShGKme ShGKme force-pushed the feat/vu2-and-vue3-compatibility branch from 06bea8c to 2c13817 Compare April 4, 2025 21:47
@ShGKme ShGKme force-pushed the feat/vu2-and-vue3-compatibility branch from 2c13817 to b9d1d73 Compare April 4, 2025 21:49
@ShGKme ShGKme marked this pull request as ready for review April 4, 2025 21:49
@ShGKme ShGKme force-pushed the feat/vu2-and-vue3-compatibility branch from b9d1d73 to 7a35aaf Compare April 4, 2025 22:33
This was referenced Apr 5, 2025
"name": "@nextcloud/webpack-vue-config",
"version": "6.2.0",
"description": "A webpack vue config for nextcloud apps",
"author": "John Molakvoæ <skjnldsv@protonmail.com>",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😿

"url": "git+https://github.com/nextcloud-libraries/webpack-vue-config.git"
},
"license": "AGPL-3.0-or-later",
"author": "John Molakvoæ <skjnldsv@protonmail.com>",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😸

Copy link
Contributor

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Copy link

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks valid 👀

Copy link
Contributor

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works on twofactor_webauthn. Many thanks!

(Had to apply #659 as well to fix the build.)

ShGKme added 6 commits April 8, 2025 17:22
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme
Copy link
Collaborator Author

ShGKme commented Apr 8, 2025

@ShGKme ShGKme force-pushed the feat/vu2-and-vue3-compatibility branch from 7a35aaf to fb852f4 Compare April 8, 2025 15:32
@ShGKme ShGKme enabled auto-merge April 8, 2025 15:32
@ShGKme ShGKme merged commit 3cdd6cc into main Apr 8, 2025
6 checks passed
@ShGKme ShGKme deleted the feat/vu2-and-vue3-compatibility branch April 8, 2025 15:33
This was referenced Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Vue3

4 participants