Override Javascript libraries
Last updated on
10 July 2022
It is possible that you will need a different version of vue.js or that you will want to modify the global vue3.spa-init.js
file loaded by the pdb_vue
module. Overriding a library is easy in a theme and can be done by adding some lines to a custom theme's themename.info.yml
file.
# Replace an entire library.
libraries-override:
pdb_vue/vue3: themename/vue3
or overriding a single file in a library
libraries-override:
vue3.spa-init:
js:
js/vue3.spa-init.js: js/custom.spa-init.js
Want to completely remove a library because you are managing it with a package manager like Vite?
# Remove entire libraries.
libraries-override:
pdb_vue/vue: false
pdb_vue/vue.spa-init: false
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion