Document how to use 3.x with Vue 2

Created on 29 November 2023, 7 months ago
Updated 6 February 2024, 5 months ago

Problem/Motivation

3.x version, compatible with Drupal 10, can still be used for Vue 2 (for backwards compatibility).

This should be documented, as it might be relevant for users upgrading to Drupal 10 but still needing Vue 2 support.

This config works for Vue 2:

libraries:
  vue:
    installation: local
    development: false
    version: 3.2.37
    cdn: unpkg
    path: /libraries/vue/dist/vue.runtime.global.prod.js
  petitevue:
    installation: local
    development: false
    cdn: unpkg
    version: 0.4.1
    path: /libraries/petite-vue/dist/petite-vue.iife.js

Steps to reproduce

Proposed resolution

Add this information to the module page
Eventually allow to switch to 2.x with the different path in UI to simplify this for users. (EOL 2023-12!)

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

3.0

Component

Documentation

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡¦πŸ‡ΊAustralia thinkingcap

    Thanks for the tip. Confirming that we have Vue 2 working with the 3.x version of this module.

    composer require npm-asset/vue:^2
    

    and in config/vuejs.settings.yml the path is changed to /libraries/vue/dist/vue.min.js:

    libraries:
      vue:
        installation: local
        development: false
        version: 3.2.37
        cdn: unpkg
        path: /libraries/vue/dist/vue.min.js
      petitevue:
        installation: local
        development: false
        cdn: unpkg
        version: 0.4.1
        path: /libraries/petite-vue/dist/petite-vue.iife.js
    
    
Production build 0.69.0 2024