question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is this abandoned?

See original GitHub issue

After spending some time to get this up and running locally, found that the only bundle created was the <theme>/balerbundles/core-bundle.js

Did some digging and found this document, which seems to imply other solutions should be used instead https://github.com/magento/baler/blob/master/docs/WHY_CUSTOM.md#how-are-folks-working-around-this-today

  • hand rolling requirejs optimization config file
  • magepack
  • other similar options…

I just want to know for definite that this repository is not the intended way to do things.

Is that correct? Or am I missing something here?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

4reactions
digiltdcommented, Nov 24, 2020

Sadly I think it has been abandoned, it has now been removed from the docs https://github.com/magento/devdocs/pull/7876

Improving performance on Magento is hard, the javascript situation is “a bit of a mess” (a very polite understated version of how I want to describe it).

Not helped by the contradicting documentation, the place where you should be able to get definitive answers on how things work is all over the place.

https://devdocs.magento.com/guides/v2.4/performance-best-practices/advanced-js-bundling.html#magento-merging-and-bundling says:

Basic merging This command merges all synchronous JavaScript files into one file. Enabling merging without also enabling bundling is not useful because Magento uses RequireJS. If you don’t enable bundling, Magento only merges RequireJS and its configuration. When you enable both bundling and merging, Magento creates a single JavaScript file:

Sounds good. But on this page https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/js-bundling.html you are told:

To configure JavaScript bundling, you must disable Javascript file merging. Bundling will not work as the merging of files excludes bundling:

Hmmm, ok but it still does say to use the minify and inbuilt bundling features. So that’s good.

Enable JavaScript bundling: Optimize bundling by minifying JavaScript files:

You are also told to minify and bundle on https://devdocs.magento.com/guides/v2.4/performance-best-practices/configuration.html#client-side-optimization-settings but futher down the page you are told:

Magento built-in mechanisms are not optimal and are shipped as fallback alternatives.

and

We do not recommend using deprecated settings like merging JS and CSS files, as they were designed only for synchronously-loaded JS in the HEAD section of the page. Using this technique can cause bundling and requireJS logic to work incorrectly.

image

🤦

2reactions
rossmccommented, Dec 4, 2020

Hi @PivitParkour94

Regarding the below, magepack v2 does this, and we run it in our pipeline.

The promising feature of using baler is it determines the requirejs dependency graph using the existing code of the theme, requirejs-config.js and other *.phtml files, which means “baling” can be a part of a CI pipeline for getting a fast magento 2 frontend, until you use PWA’s which makes it all obsolete anyway.

It has to be magepack v2 to run in the pipeline, it won’t work with magepack v1.

Magepack 2 uses a custom bundler based on Baler. Check out https://youtu.be/ahxoTedqHjw.

You need v10+ of node in your CI pipeline for it to work. You still need to generate the magepack.congfig.js locally, but the bundles can be generated in the pipeline line. The magepack.config.js rarely needs to be updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is This Abandoned Time Capsule Haunted By It's Previous ...
#abandoned #hidden #timecapsule Tonight we investigate an abandoned hidden time capsule that we've been wanting to access for some time, ...
Read more >
Victoria Adeyinka - This Abandoned - YouTube
286K views 11 months ago. 286,476 views • Premiered Jan 28, 2022. To Stream This Abandoned: https://distrokid.com/hyperfollow/vic.
Read more >
This Abandoned Home in the USA Has a Last Message on its ...
Exploring abandoned places is my hobby and finance it all out of my own pocket and the donations I get from the people...
Read more >
IS THIS REALLY ABANDONED? - YouTube
We Explored The CRAZIEST Abandoned Cliff House In The Middle Of Nowhere · WARNING *DISTURBING* Wait Until YOU See What I Found In...
Read more >
What is abandoned? | Macmillan Dictionary Blog
Definition 1. left empty or no longer used 2. left alone by someone who should stay with you and look after you Origin...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found