From 81f1fbc6c75e456a623f58a3076d2ebbde54d3dc Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 4 Mar 2024 09:55:44 -0700 Subject: [PATCH] Target UMD runtime for extensions This explicitly targets `node_modules/vue/dist/vue.js` to ensure that Dashboard is always exposing the UMD builds of Vue to the `window` object (`shell/core/plugins-loader.js`). For more information on different builds that are available to us, see the vue documentation for explanation of different builds [^1] [^1]: https://v2.vuejs.org/v2/guide/installation#Explanation-of-Different-Builds Signed-off-by: Phillip Rak --- shell/vue.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/vue.config.js b/shell/vue.config.js index 506a064bf8..49a4d893a3 100644 --- a/shell/vue.config.js +++ b/shell/vue.config.js @@ -400,7 +400,7 @@ module.exports = function(dir, _appConfig) { config.resolve.alias['@pkg'] = path.join(dir, 'pkg'); config.resolve.alias['./node_modules'] = path.join(dir, 'node_modules'); config.resolve.alias['@components'] = COMPONENTS_DIR; - config.resolve.alias['vue$'] = dev ? path.resolve(process.cwd(), 'node_modules', 'vue') : 'vue'; + config.resolve.alias['vue$'] = path.resolve(process.cwd(), 'node_modules', 'vue', 'dist', dev ? 'vue.js' : 'vue.min.js'); config.resolve.modules.push(__dirname); config.plugins.push(virtualModules); config.plugins.push(autoImport);