<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by vova.yatsyuk on Medium]]></title>
        <description><![CDATA[Stories by vova.yatsyuk on Medium]]></description>
        <link>https://medium.com/@vovayatsyuk?source=rss-63d4767d195f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jxQ0NMCp3wvHrx-Z-zjoog.jpeg</url>
            <title>Stories by vova.yatsyuk on Medium</title>
            <link>https://medium.com/@vovayatsyuk?source=rss-63d4767d195f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 14:11:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vovayatsyuk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Breeze Theme for Magento]]></title>
            <link>https://vovayatsyuk.medium.com/breeze-theme-for-magento-4ee1c615b652?source=rss-63d4767d195f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ee1c615b652</guid>
            <category><![CDATA[magento]]></category>
            <dc:creator><![CDATA[vova.yatsyuk]]></dc:creator>
            <pubDate>Wed, 15 Dec 2021 13:59:19 GMT</pubDate>
            <atom:updated>2021-12-15T13:59:19.038Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s finally happened. Two months of active work and we are ready to tell you about our new Magento product.</p><figure><img alt="Breeze Theme Homepage" src="https://cdn-images-1.medium.com/max/1024/1*eDV5kFP0_PlP_mGTlBzrbw.png" /><figcaption>Breeze Homepage</figcaption></figure><p>Breeze Theme — is a great starter theme for your next unique design. Since it doesn’t use Luma as a parent theme it’s a super small and feature-rich theme: critical CSS, responsive images, a dark scheme, RTL support, and more.</p><p>Let’s do a quick overview of the main features and their technical implementation details.</p><h3>General Approach</h3><p>Theme CSS is written from scratch using LESS and automatically compiled by Magento. We did our best to keep CSS as small as possible, and achieved 13kB of critical CSS and 9kB of icons, animations, and focus/hover effects.</p><p>As for layout and template files, we decided to inherit them from Magento core modules. Just a few templates were changed, and a few layout updates were added on top of Magento layout update instructions.</p><p>This approach allows us easily integrate our modules and keep the same codebase for Luma-based and Breeze-based themes.</p><h3>JS Stack</h3><p>Breeze Theme uses our <a href="https://swissuplabs.com/magento-2-breeze-module.html">Breeze module</a>. If you didn’t hear of it — it’s a drop-in replacement for the Luma js stack. You can read more about it in my <a href="https://vovayatsyuk.medium.com/what-is-breeze-and-how-its-working-185a1c816b44">previous</a> <a href="https://vovayatsyuk.medium.com/the-state-of-breeze-ba347c8b4ed9">posts</a>.</p><h3>Critical CSS</h3><p>If you ever worked with a Luma-based theme, you know the way to write a proper CSS file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e25b410014254cbb355a93a4ebd9e59/href">https://medium.com/media/4e25b410014254cbb355a93a4ebd9e59/href</a></iframe><p>Breeze theme uses a different approach. We do not split the styles per device but split them by layout shift causer. Here is what we are doing:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/55dbc6162bfeecd1060b02c141c8ef0e/href">https://medium.com/media/55dbc6162bfeecd1060b02c141c8ef0e/href</a></iframe><p>This allows having the separate critical CSS file that must be loaded synchronously, and non-critical styles that loaded asynchronously. Additionally, our approach is a lot easier to remember :)</p><h3>Responsive Images</h3><p>Breeze Theme provides perfectly sized images for the majority of modern devices. The sizes and srcset attributes are easily configurable via theme’s view.xml file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9a1afea713d965b700a908d859d935a7/href">https://medium.com/media/9a1afea713d965b700a908d859d935a7/href</a></iframe><h3>Advanced Media Queries</h3><p>Breeze Theme uses <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">CSS custom properties</a> for all colors and animation definitions. This allows implementing prefers-reduced-motion and prefers-color-scheme media queries in just 1kB of CSS:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8950c35c8c541be73f03e21d31a491a/href">https://medium.com/media/a8950c35c8c541be73f03e21d31a491a/href</a></iframe><h3>Theme Colors</h3><p>Did you notice color variables in the previous section? Yes, that’s a <a href="https://tailwindcss.com/">Tailwind 3.0</a> color palette and it’s fully available to use as less variables so you can change theme colors with a few lines on code. Here is how we declare default colors:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b898233879054785703c8f39d651025f/href">https://medium.com/media/b898233879054785703c8f39d651025f/href</a></iframe><p>RGB color definition is used to provide even more control in CSS by composing RGB value with alpha channel:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c86e253a56003003608b77e606bf4e6/href">https://medium.com/media/6c86e253a56003003608b77e606bf4e6/href</a></iframe><h3>RTL Support</h3><p>We use <a href="https://github.com/swissup/module-rtl">swissup/module-rtl</a> package for that. This package provides useful mixins to use for LTR/RTL-dependent properties.</p><p><em>Thanks for reading! I’ll include the link to the demo store when it will be ready.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ee1c615b652" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The State of Breeze]]></title>
            <link>https://vovayatsyuk.medium.com/the-state-of-breeze-ba347c8b4ed9?source=rss-63d4767d195f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba347c8b4ed9</guid>
            <category><![CDATA[magento-performance]]></category>
            <category><![CDATA[magento-2]]></category>
            <category><![CDATA[magento]]></category>
            <dc:creator><![CDATA[vova.yatsyuk]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 07:09:20 GMT</pubDate>
            <atom:updated>2021-10-06T11:12:57.717Z</atom:updated>
            <content:encoded><![CDATA[<p>A few months ago I wrote the <a href="https://vovayatsyuk.medium.com/what-is-breeze-and-how-its-working-185a1c816b44">first article about Breeze</a> — performant Magento frontend.</p><blockquote>Let’s recap the first post in one paragraph. Breeze removes built-in JavaScript files and replaces them with its own implementation. Since API of replaced components is almost the same, everything keeps working as before, but much more faster.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cH6nx2dlP9YG7lf6SQQBZA.png" /></figure><p>Now, it’s time to shake things up, and show you what we’ve done since then!</p><h3>Single Page Application</h3><p>Breeze now provides a SPA experience for the regular Luma theme! Here is a short video that shows how it’s working:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F622758490%3Fh%3D9872bc8334%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F622758490&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1265038721-91fafd1daf850c2db46a938832bf5bc7aecec22fa18b276ef_295x166&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="532" height="360" frameborder="0" scrolling="no"><a href="https://medium.com/media/68bcfadbd557b8dc285a94f31311a0c0/href">https://medium.com/media/68bcfadbd557b8dc285a94f31311a0c0/href</a></iframe><p>There were a few issues to fix to get Breeze working as a SPA application. The first issue was that each time you use the Back and Forward buttons or re-visit some page, <a href="https://github.com/turbolinks/turbolinks">Turbolinks</a> was restoring its cache (which already had rendered views), and then Knockout started initialization and rendering. This behavior led to duplicated content for some view components. To fix this issue we’ve added an initial markup state and restore it right before the page is saved to the Turbolinks cache:</p><pre>initialize: function (name, options, element) {<br>    this.markup = $(element).html();<br>},</pre><pre>destroy: function () {<br>    this.element.html(this.markup);<br>}</pre><p>Another issue we had to fix — is to keep an eye on event listeners added by Breeze components to prevent memory leaks and duplicated event observer calls. This one was fixed with more granular event listener initialization and destroy method in every component.</p><h3>Lazy mixins and widgets</h3><p>I’m very happy about this simple feature. When doing customizations or writing custom modules you’ll end up with a few mixins and new widgets based on existing code. In earlier Breeze versions developer had to describe these dependencies in XML files so Breeze will add parent js files first and then yours. It was very annoying. Now, you can write your js code and nothing else — Breeze will handle everything regardless of the order of the js files:</p><pre>// 1. a-vendor/tabs-mixin.js<br>// 2. b-vendor/mega-tabs.js<br>// 3. tabs.js - the first two components depends on this one, but<br>// you don’t need to worry about it. Breeze will process dependent<br>// components as soon as parent classes will be resolved.</pre><pre>// a-vendor/tabs-mixin.js<br>$.mixin(&#39;tabs&#39;, {<br>    open: function (original) {<br>        original();<br>    }<br>});</pre><pre>// b-vendor/mega-tabs.js<br>$.widget(‘megaTabs’, ‘tabs’, {<br>    open: function () {<br>        this._super();    <br>    }<br>});</pre><pre>// tabs.js<br>$.widget(‘tabs’, {<br>    open: function () {<br>        //<br>    }<br>});</pre><h3>Bundles invalidation</h3><p>Breeze js bundles may depend on configuration values. For example, when Paypal is disabled, paypalCheckout widgets are no longer needed and we should not include them in the js bundle:</p><pre>&lt;item name=&quot;paypalCheckout&quot; xsi:type=&quot;array&quot;&gt;<br>    &lt;item name=&quot;path&quot; xsi:type=&quot;string&quot;&gt;Swissup_Breeze/js/components/paypal-checkout&lt;/item&gt;<br>    &lt;item name=&quot;enabled&quot; xsi:type=&quot;helper&quot; helper=&quot;Swissup\Breeze\Helper\Config::isAnyEnabled&quot;&gt;<br>        &lt;param name=&quot;0&quot;&gt;payment/paypal_express_bml/active&lt;/param&gt;<br>        &lt;param name=&quot;1&quot;&gt;payment/payflow_express_bml/active&lt;/param&gt;<br>    &lt;/item&gt;<br>&lt;/item&gt;</pre><p>Previously you had to deploy static content after each configuration update. Now, Breeze refreshes bundles and you don’t need to remember when to redeploy static content.</p><h3>PageBuilder integration</h3><p>We’ve integrated two components from the PageBuilder module so far: Slider and Carousel widgets. Unlike original widgets, we didn’t use Slick Carousel dependency and implemented our own CSS-first carousel with less the 3kB of javascript.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F622779965%3Fh%3Dd1b5da2042%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F622779965&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1265060457-e45eb2744d53eeb4408cc3cfcdb6af081b75ebb05e800adce_640&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="720" height="774" frameborder="0" scrolling="no"><a href="https://medium.com/media/545af5ccb7a19d41e1fa56b7ae1f82d0/href">https://medium.com/media/545af5ccb7a19d41e1fa56b7ae1f82d0/href</a></iframe><p>The javascript is used to rebuild pagination on viewport size changes, to determine which page is active right now, and for the next/prev buttons. The scroll itself is CSS-powered and uses the scroll-snap feature.</p><h3>More integrations</h3><ul><li>Bundle products. Breeze is supporting all product types now!</li><li>Magento_Captcha</li><li>Magento_ReCaptcha</li><li>Magento_LoginAsCustomer</li><li>Mirasvit_CacheWarmer</li><li>Argentotheme and 28 bundled modules</li></ul><p>Next time we will improve the new slowest part of the Luma theme. Stay tuned.</p><p>Demo: <a href="https://breeze.swissupdemo.com/">https://breeze.swissupdemo.com/</a></p><p><em>Thanks for reading!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba347c8b4ed9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Breeze, and how it’s working?]]></title>
            <link>https://vovayatsyuk.medium.com/what-is-breeze-and-how-its-working-185a1c816b44?source=rss-63d4767d195f------2</link>
            <guid isPermaLink="false">https://medium.com/p/185a1c816b44</guid>
            <category><![CDATA[magento]]></category>
            <category><![CDATA[magento-performance]]></category>
            <dc:creator><![CDATA[vova.yatsyuk]]></dc:creator>
            <pubDate>Tue, 01 Jun 2021 08:01:47 GMT</pubDate>
            <atom:updated>2021-10-03T14:49:43.194Z</atom:updated>
            <content:encoded><![CDATA[<h4>A quick technical overview of the Breeze module for Magento.</h4><p>Breeze — is a performant frontend javascript stack built to be equally flexible to its predecessor.</p><p>Before we take a deep dive into the Breeze implementation details, let’s step aside for a moment and quickly examine how Magento frontend works and why it’s so painfully slow.</p><h3>Luma stack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2J-QJIryLY1YCBk24RTOJA.png" /><figcaption>Lighthouse score (mobile) for the Luma theme.</figcaption></figure><p>Here is a shortened example of a Magento page source that the browser will parse and execute to bring a ready-to-use page for each visitor:</p><pre>&lt;html&gt;<br>  &lt;head&gt;<br>    &lt;script src=&quot;require.js&quot;/&gt;<br>    &lt;script src=&quot;requirejs-config.js&quot;/&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>    …<br>    &lt;div data-mage-init=&#39;{&quot;component&quot;: {}}&#39;&gt;&lt;/div&gt;<br>    …<br>    &lt;script type=&quot;text/x-magento-init&quot;&gt;<br>    {<br>      &quot;*&quot;: {<br>        &quot;Magento_Ui/js/core/app&quot;: {<br>          &quot;components&quot;: {}<br>        }<br>      }<br>    }<br>    …<br>    &lt;/script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>The page source code includes two javascript resources: require.js and requirejs-config.js. The browser download them and then the magic starts:</p><ol><li>requirejs-config.js instructs require.js to download few more resources including mage/apply/main</li><li>mage/apply/main walks the DOM structure searching for data-mage-init and text/x-magento-init nodes.</li><li>Each node instructs require.js to download and initialize components declared in this node.</li><li>Each component may ask to download more dependencies and so on.</li></ol><p>The idea is brilliant and brings a lot of benefits, but it’s not working efficiently with as many dependencies as Magento has:</p><ul><li>Main menu — 16 dependencies</li><li>Catalog swatches — 28 dependencies</li><li>Header cart — 49 dependencies</li><li>Auth popup — 57 dependencies</li></ul><p>Here is a shortened dependency tree of the Magento_Customer/js/view/authentication-popup component:</p><pre>‣ Magento_Customer/js/view/authentication-popup<br>  ‣ knockoutjs/knockout<br>  ‣ Magento_Ui/js/form/form<br>    ‣ Magento_Ui/js/lib/spinner<br>    ‣ mage/requirejs/resolver<br>    ‣ Magento_Ui/js/form/adapter<br>    ‣ Magento_Ui/js/lib/core/collection<br>      ‣ underscore<br>      ‣ mage/utils/main<br>        ...<br>    ‣ Magento_Ui/js/core/app<br>    ‣ mage/validation<br>  ‣ Magento_Customer/js/action/login<br>  ‣ Magento_Customer/js/customer-data<br>  ‣ Magento_Customer/js/model/authentication-popup<br>  ‣ mage/translate<br>  ‣ Magento_Ui/js/modal/alert<br>  ‣ mage/validation</pre><p>Magento tries to solve this dependency nightmare with js bundles. Unfortunately, neither bundles nor optimization will help your application if it has too much code.</p><h3>Breeze stack — The Luma is dead, long live Luma!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RHONRH-O_4cm3dyVf-KpAw.png" /><figcaption>Lighthouse score (mobile) for the Breeze-powered Luma theme</figcaption></figure><p>When we started to explore the ways to improve the performance of the Magento store it was crucial to keep full compatibility with current CSS, HTML, and at least partial compatibility with JS components. This would allow us to make our existing themes and modules breeze-friendly in a short period.</p><blockquote><strong>In a perfect scenario, we want to use the same javascript file for both Luma and Breeze-powered theme.</strong></blockquote><p>The solution was pretty straightforward — create a module that will inject a new JS stack instead of the default one. The new stack must automatically work with existing data-mage-init and text/x-magento-init syntax. The biggest plus of this solution is that it doesn’t require any changes to CSS and HTML.</p><blockquote><strong>Breeze is fully compatible with Luma and Blank themes because it doesn’t modify CSS and HTML.</strong></blockquote><p>Another issue to solve was providing a working and easy-to-use js bundling mechanism. We decided to incorporate bundling definitions directly into the js components declarations in XML layout update files. Layout update was chosen as it allows to inject components on a server-side based on their existence on the generated page output.</p><p>Let’s see what Breeze brings us after few months of active development.</p><h3>Widgets</h3><p>You can create widgets in a very similar way to Luma widgets:</p><pre>$.widget(&#39;widgetName&#39;, &#39;parentWidget&#39;, {<br>  component: &#39;menu&#39;,<br>  options: {<br>    option1: &#39;defaultValue&#39;<br>    option2: &#39;defaultValue&#39;<br>  },<br>  create: function () {<br>    console.log(this.element);<br>    console.log(this.options);<br>  }<br>});</pre><p>This widget will be automatically mounted on the following node:</p><pre>&lt;div data-mage-init=&#39;{&quot;menu&quot;: {&quot;option1&quot;: &quot;optionValue&quot;}}&#39;&gt;&lt;/div&gt;</pre><h3>UI components</h3><p>You can create a view component that will render a client-side template.</p><p>Here is an example of a tiny component that handles the default welcome message block:</p><pre>$.view(&#39;customer&#39;, {<br>  component: &#39;Magento_Customer/js/view/customer&#39;,<br>  customer: $.sections.get(&#39;customer&#39;)<br>});</pre><p>This component will be automatically mounted on the following node:</p><pre>&lt;div class=&quot;greet welcome&quot; data-bind=&quot;scope: &#39;customer&#39;&quot;&gt;<br>  &lt;!-- ko if: customer().fullname --&gt;<br>  …<br>&lt;/div&gt;<br>&lt;script type=&quot;text/x-magento-init&quot;&gt;<br>{<br>  &quot;*&quot;: {<br>    &quot;Magento_Ui/js/core/app&quot;: {<br>      &quot;components&quot;: {<br>        &quot;customer&quot;: {<br>          &quot;component&quot;: &quot;Magento_Customer/js/view/customer&quot;<br>        }<br>      }<br>    }<br>  }<br>}<br>&lt;/script&gt;</pre><p>Another common use case in a Luma-based theme is a component that renders a template from an external html file. In Breeze, you should render this template using layout XML instructions:</p><pre>&lt;referenceContainer name=&quot;before.body.end&quot;&gt;<br>  &lt;block class=&quot;Swissup\Breeze\Block\HtmlTemplate&quot; name=&quot;breeze.uiMessages&quot; template=&quot;Magento_Ui::messages.html&quot;/&gt;<br>&lt;/referenceContainer&gt;</pre><p>Then, the view component can refer to this template:</p><pre>$.view(&#39;uiMessages&#39;, {<br>  component: &#39;Magento_Ui/js/view/messages&#39;,<br>  defaults: {<br>    template: &#39;uiMessages&#39;<br>  }<br>}</pre><h3>Mixins</h3><p>It is crucial to have the ability to extend and override built-in components when building extendable frontend. Breeze allows to extend existing components using the simple syntax:</p><pre>$.mixin(&#39;menu&#39;, {<br>  open: function (original, argument) {<br>    return original(argument);<br>  }<br>});</pre><h3>JS Bundles</h3><p>While Breeze has much fewer javascript resources to import, it’s needless to say that js bundling is a must-have feature for the frontend that will be extended by third-party modules.</p><p>Breeze requires developers to assign their JS resources into new or existing bundles using XML layout update files. The following bundles are available out of the box. Here is a short example:</p><pre>&lt;referenceBlock name=&quot;breeze.js&quot;&gt;<br>  &lt;arguments&gt;<br>    &lt;argument name=&quot;bundles&quot; xsi:type=&quot;array&quot;&gt;<br>      &lt;item name=&quot;default&quot; xsi:type=&quot;array&quot;&gt;<br>        &lt;item name=&quot;items&quot; xsi:type=&quot;array&quot;&gt;<br>          &lt;item name=&quot;Vendor_Module/js/component&quot; xsi:type=&quot;string&quot;&gt;Vendor_Module/js/breeze/component&lt;/item&gt;<br>        &lt;/item&gt;<br>      &lt;/item&gt;<br>    &lt;/argument&gt;<br>  &lt;/arguments&gt;<br>&lt;/referenceBlock&gt;</pre><h3>Integration with third-party modules</h3><p>Here are some integration scenarios we used for our modules:</p><h4>1. It just works</h4><p>Some of our modules don’t rely heavily on magento code. This is a perfect integration scenario. <strong>We use the same js file for both Luma and Breeze stack.</strong></p><p>The following HTML is generated by our block:</p><pre>&lt;div data-mage-init=&#39;{&quot;Vendor_Module/js/component&quot;: {}}&#39;&gt;&lt;/data&gt;</pre><p>And here is the content of Vendor_Module/js/component</p><pre>define([<br>  &#39;jquery&#39;,<br>  &#39;Magento_Customer/js/customer-data&#39;<br>], function ($, customerData) {<br>  &#39;use strict&#39;;</pre><pre>  var cart = customerData.get(&#39;cart&#39;);</pre><pre>  сart.subscribe(...);<br>});</pre><p>The only thing that should be done for Breeze is to create breeze_default.xml file and declare component for Vendor_Module/js/component</p><h4><strong>2. It almost works</strong></h4><p>Another common solution was to modify the define part of js file:</p><p>Before:</p><pre>define([&#39;jquery&#39;, &#39;underscore&#39;, &#39;mage/cookies&#39;], function ($, _) {<br>  &#39;use strict&#39;;</pre><pre>  ...<br>});</pre><p>After:</p><pre>(function (factory) {<br>  &#39;use strict&#39;;</pre><pre>  if (typeof define === &#39;function&#39; &amp;&amp; define.amd) {<br>    define([&#39;jquery&#39;, &#39;underscore&#39;, &#39;mage/cookies&#39;], factory);<br>  } else {<br>    $.easybanner = {};<br>    $.easybanner.Widget = factory($, _);<br>  }<br>}(function ($, _) {<br>  &#39;use strict&#39;;</pre><pre>  ...<br>});</pre><h4>3. The worst case. Nothing works.</h4><p>In this case, we just create a new component in Vendor_Module/js/breeze/component and implement the same logic again:</p><pre>(function () {<br>  &#39;use strict&#39;;</pre><pre>  $.widget(&#39;gallery&#39;, {<br>    component: &#39;mage/gallery/gallery&#39;,<br>    options: {}<br>    ...<br>  });<br>});</pre><h3>p.s.</h3><p>Single-page applications (SPA) greatly improve customer experience. We’ve already played with Turbo on a Breeze dev-branch and it’s awesome! Stay tuned to our updates!</p><p><em>Thanks for reading!</em> <em>Leave a comment below if you have any questions.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=185a1c816b44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>