diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-03-04 19:35:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 19:35:44 +0300 |
commit | b774954679f99ef190b9ef71043529563f764946 (patch) | |
tree | acf7041e5865c57841fc09e61369a5c9c8c52385 /plugins/CoreVue | |
parent | da4fa4175f7cef7cd93d600487fadad34330468a (diff) |
[Vue] Chunk UMD JavaScript into a set of asynchronously loaded files (#18761)
* proof of concept for chunking UMD JavaScript into a set of files that are loaded asynchronously
* take into account alternative plugin directories
* make chunk count and load umds individually configurable (undocumented config) and get to work
* fix a bug and add chunk JS sizes to output of development:compute-js-asset-size
* document
* fill out TODO documentation
* make sure cache buster is added to chunk script srcs
* add some checks in case a chunk does not exist on disk (happens during some tests)
* use realpath on test PIWIK_INCLUDE_PATH so search/replace on paths for relative path will work
* add integration test and get to pass
* fix for when disable_merged_assets=1
* fix condition
* fix ui test failure
* update screenshot
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/CoreVue')
-rw-r--r-- | plugins/CoreVue/Commands/Build.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/CoreVue/Commands/Build.php b/plugins/CoreVue/Commands/Build.php index e7294bd8f4..558afd3ab2 100644 --- a/plugins/CoreVue/Commands/Build.php +++ b/plugins/CoreVue/Commands/Build.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\CoreVue\Commands; use Piwik\AssetManager\UIAssetFetcher\JScriptUIAssetFetcher; +use Piwik\AssetManager\UIAssetFetcher\PluginUmdAssetFetcher; use Piwik\Container\StaticContainer; use Piwik\Filesystem; use Piwik\Plugin\ConsoleCommand; @@ -63,7 +64,7 @@ class Build extends ConsoleCommand } } - $plugins = JScriptUIAssetFetcher::orderPluginsByPluginDependencies($plugins); + $plugins = PluginUmdAssetFetcher::orderPluginsByPluginDependencies($plugins); // remove webpack cache since it can result in strange builds if present Filesystem::unlinkRecursive(PIWIK_INCLUDE_PATH . '/node_modules/.cache', true); |