Can we directly use vue without vue:build?are there any alternatives?

Can we directly use vue without vue:build?are there any alternatives?

Yes, though I haven’t tested that workflow. All you have to do for a custom plugin is to setup your project in the plugin to build a UMD, then add the built UMD JS file to Matomo via the AssetManager.getJavaScriptFiles event. The UMD file should be added as a global to window named after the plugin. To access JS modules in other plugins, use window.<PluginName>, for example, window.CoreHome.Periods. (This may change in the future though.)

If you want to do core development, then you have to use vue:build. Though this command just builds the vue CLI command and runs it, nothing else. You can see the command it runs by adding --print-build-command to vue:build.

Also, keep in mind that Vue support is still in its infancy right now. Most of the code is still written in angularjs.

2 Likes