1

I enabled bundle javascript file, but i saw in my local js file is 3.7Mb and my dev site just 1.0Mb. Here is my config

'dev' => 
  array (
    'js' => 
    array (
      'merge_files' => '1',
      'minify_files' => '1',
      'enable_js_bundling' => '1',
    ),
    'css' => 
    array (
      'minify_files' => '1',
      'merge_css_files' => '1',
    ),
    'static' => 
    array (
      'sign' => '1',
    ),
  )

here is the result between my local vs dev site: enter image description here

Code and config are same. File etc/view.xml inherit from Blank theme.

I dont know why file size is too different between 2 sites.

Could someone help me out to understand it?

As my understanding like Mageto 2.1.x, i will have bundle1.min.js bundle2.min.js... if my js file is big.

1 Answer 1

0

It looks like on Your local you have Merge js enabled.

When You want to bundel js for 1MB each you need to:

  1. Switch to developer mode
  2. Stores=> Configurations=>Advanced=>Developer=>JavaScript Settings=>Merge js switch to No.
  3. Go back to production mode to see result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.