vue.runtime.global.js is back after changing from local to CDN in settings

Created on 11 October 2024, 4 months ago

Problem/Motivation

🐛 Must use vue.global.prod.js instead of vue.runtime.global.js Active fixed the default config so that on install, vue.global.prod.js is used instead of vue.runtime.global.js.

However vue.runtime.global.js returns after changing Vuejs module settings (/admin/config/development/vuejs):

  • Installation type from 'Local library' to 'Use an external CDN'.

Steps to reproduce

  1. Install vuejs module: composer require 'drupal/vuejs:^3.0'; drush pm:enable vuejs
  2. Check the config settings: drush cget vuejs.settings. vue.path value is /libraries/vue/dist/vue.global.prod.js -- all good.
  3. Go to /admin/config/development/vuejs and change installation type to 'Use and external CDN' and save
  4. Check the config settings: drush cget vuejs.settings. vue.path value is now //cdnjs.cloudflare.com/ajax/libs/vue/3.5.11/vue.runtime.global.prod.js - 'runtime' should not be in the path.

Proposed resolution

In `submitForm()` this line needs to be adjusted:

$vueRuntimeFilename = $vueSettings['development'] && $vueSettings['installation'] == 'local' ? 'vue.runtime.global.js' : 'vue.runtime.global.prod.js';

to

$vueRuntimeFilename = $vueSettings['development'] && $vueSettings['installation'] == 'local' ? 'vue.global.js' : 'vue.global.prod.js';

Remaining tasks

Make changes and submit MR.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇦🇺Australia thinkingcap

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024