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

Merge JavaScript Files does not work #2563

Closed
andreaskoch opened this issue Nov 30, 2015 · 3 comments
Closed

Merge JavaScript Files does not work #2563

andreaskoch opened this issue Nov 30, 2015 · 3 comments

Comments

@andreaskoch
Copy link
Member

The configuration value for merging the JavaScript files has no effect.

Environment

  • Magento Version: 2.0.0 CE
  • Webserver: Nginx + PHP FPM

Steps to reproduce

  1. Open the homepage of a Magento 2.0 CE Demo Store (e.g. Magento 2 Developer Hub > MAGENTO 2.0 CE FRONTEND DEMO)
  2. Observe the number of JS requests in your browsers' network tab. About 120 JavaScript files are being requested:
    Screenshot of the Magento 2.0 CE Frontend Demo Store JS Requests
  3. Goto Backend > Stores > Configuration > Advanced > Developer > JavaScript Settings and set Merge JavaScript Files to Yes
  4. Click "Save Config"
  5. Refresh all Caches
  6. Goto the homepage and observe the number of JS requests in your browsers' network tab

Observed Behavior

All JavaScript files are still being loaded separately:

Screenshot Number of JS Requests with JS Merge Enabled

@gordonknoppe
Copy link
Contributor

You will see the number of requests reduced when Magento is in production mode.

@guz-anton
Copy link
Contributor

Merge JavaScript Files to Yes currently merges only js files added to <head> explicitly.
You can open page source (Ctrl+U). And find that instead of several files (../requirejs/require.js, ../mage/requirejs/mixins.js, ../requirejs-config.js) you have something like static/_cache/merged/26a...e.js.

If you want to reduce number of request to different static files try to set
Enable Javascript Bundling to Yes and setup Magento mode to production.

@guz-anton
Copy link
Contributor

It is not an issue.

magento-engcom-team pushed a commit that referenced this issue May 18, 2018
Fixed issues:
- MAGETWO-91894 Backport Static Test Fixes in CE
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

No branches or pull requests

3 participants