Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling asset cache causes form integrations not to load their assets. #755

Closed
danieliser opened this issue Feb 17, 2020 · 2 comments
Closed

Comments

@danieliser
Copy link
Member

danieliser commented Feb 17, 2020

Can either just bundle them all by default into core JS for now or conditionally enqueue them if they are active and asset cache is inactive.

@fpcorso
Copy link
Contributor

fpcorso commented Sep 9, 2020

@danieliser We probably need to define a strategy to move forward on this. If we get the asset cache disabling lower, it would help but we will always have some that disable the cache for whatever reason.

Right now, all of our integration JS files combined only equals 10 KB. The generated (non-minified) site.js file is around 140 KB. So it would only increase that file by 7% to add all form integration JS into the core site.js file. After minification, that file would still be less than 60 KB which is still really good compared to all the other files WP and plugins are loading on most sites.

@danieliser
Copy link
Member Author

@fpcorso Eventually they were to be loaded into the main js bundle, the reason it wasn't is because the integrations are all written in ES6 and use Webpack bundler, the old code still is ES5 and bundled manually using Gulp routines.

To merge them effectively during build we need to adjust the gulp routine to merge those files into the main bundle. Might require making the normal JS build task call the webpack tasks first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants