Improve webpack bundling
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- build-system, performance
Direzione di ricerca
Inizia ispezionando lo script di build di webpack e gli entrypoint che producono content-helper/editor-sidebar.js e dashboard-widget.js. Confronta il modo in cui vengono raggruppati Smart Linking e il modulo Telemetry, quindi ricerca l’approccio esistente ai package in stile Gutenberg. Il lavoro è completato quando sono presenti bundle più piccoli e specifici per funzionalità, le funzionalità disabilitate non vengono caricate e l’avviso relativo alle dimensioni di webpack segnalato viene risolto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem?
After the introduction of the new Smart Linking interface, when building the project with webpack, we get a particular warning regarding the bundle size.
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
content-helper/editor-sidebar (249 KiB)
content-helper/editor-sidebar.css
content-helper/editor-sidebar.js
content-helper/editor-sidebar-rtl.css
content-helper/editor-sidebar.asset.php
WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Describe the solution you'd like
Improve the resulting bundle. Ideally, we should be able to break each individual feature into its own bundle, and enqueue the JS file each time is needed. This would also prevent loading, for example, the Smart Linking JS code when this feature is actually disabled.
This might require breaking each individual feature into an individual package and have the build script take care of those, similarly with what Gutenberg core does with its components. But I would need to do a deeper research on how that works.
Describe alternatives you've considered
Another alternative would be looking into reducing the bundle size by avoiding repeated code. One good example is the Telemetry module that is used everywhere, and it's bundled with both the editor-sidebar.js and dashboard-widget.js for example. If we could externalize this module and use it without including it in the bundle, it would save some space in the final bundle, solving the warning.
- Lingua principale
- PHP
- Stelle
- 67
- Fork
- 38
- Merge medio
- 1g 5h
- PR unite (30g)
- 79
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Parsely/wp-parsely
-
Bug Feature: Engagement Boost wp-parsely
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Parsely/wp-parsely#4856 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Feature: Engagement Boost wp-parsely
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Parsely/wp-parsely#4855 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Feature: Engagement Boost wp-parsely
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Parsely/wp-parsely#4854 ·
I maintainer di solito rispondono entro 1 giorno
-
wp-parsely
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Parsely/wp-parsely#4753 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug wp-parsely
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
Parsely/wp-parsely#4663 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Parsely/wp-parsely
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
parime/glpi-iso27001-management#1165 ·
I maintainer di solito rispondono entro 1 giorno
-
15.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
opnsense/plugins#5976 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
open-telemetry/opentelemetry-php-distro#176 ·
I maintainer di solito rispondono entro 2 giorni