Skip to content

Commit

Permalink
[UX Vue] Add lines for components lazy-loading
Browse files Browse the repository at this point in the history
Hi, this PR follows symfony/ux#1177 (comment). 

The added lines were removed from the documentation, but I really think we should still document the lazy-loading behavior of Vue controller components (thanks to `'lazy'` parameter).
  • Loading branch information
Kocal authored Oct 11, 2023
1 parent d222415 commit dba8055
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions symfony/ux-vue/2.9/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@
"warn_if_missing": true,
"requires": "symfony/webpack-encore-bundle"
},
{
"file": "assets/app.js",
"content": "// If you prefer to lazy-load your Vue.js controller components, in order to reduce the JavaScript bundle the smallest as possible,",
"position": "bottom",
"warn_if_missing": true,
"requires": "symfony/webpack-encore-bundle"
},
{
"file": "assets/app.js",
"content": "// and degrade performances as little as possible, you can use the following line instead:",
"position": "bottom",
"warn_if_missing": true,
"requires": "symfony/webpack-encore-bundle"
},
{
"file": "assets/app.js",
"content": "registerVueControllerComponents(require.context('./vue/controllers', true, /\\.vue$/, 'lazy'));",
"position": "bottom",
"warn_if_missing": true,
"requires": "symfony/webpack-encore-bundle"
},
{
"file": "assets/app.js",
"content": "registerVueControllerComponents();",
Expand Down

0 comments on commit dba8055

Please sign in to comment.