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

[~FEATURE] Concatenate core js files #134

Open
wants to merge 6 commits into
base: 2.0
Choose a base branch
from
Open

[~FEATURE] Concatenate core js files #134

wants to merge 6 commits into from

Conversation

riker09
Copy link
Contributor

@riker09 riker09 commented Oct 1, 2015

This fixes #100 and addresses #111.

The most frequently used Magento core JS files are concatenated into one file, minimizing HTTP requests. The uglification processs might destroy some prototype function, I think I've stumbled accross a blog post somewhere, but this is highly speculative and has not been tested. So far, at least product page still works. :)

Volker Thiel added 6 commits September 22, 2015 09:23
This minimizes additional HTTP requests while still maintaining the possibility for third-party modules to add custom JS and maybe even merging JS files from backend config (untested!).
Fixes #100 and addresses #111
@riker09
Copy link
Contributor Author

riker09 commented Oct 6, 2015

Just as I expected I ran into some errors when prototype was uglified. The reason is that uglifyjs renames some super global variable names of prototype which some function depends upon. The solution is very simple: Just don't do it. Lucky for me, uglifyjs comes with an option that lets me skip this process.

As a result the core files are still minified with all the needed functions (and global variable names) still intact.

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

Successfully merging this pull request may close these issues.

Conact Magento JS Files
1 participant