├── README.md
└── build.js
/README.md:
--------------------------------------------------------------------------------
1 | # magento-rjs-config
2 |
3 | **NOTE** This readme is deprecated. See https://devdocs.magento.com/guides/v2.3/performance-best-practices/advanced-js-bundling.html
4 |
5 | **NOTE** Configuration generation tool that automates build.js creation was created by Shane Osbourne: https://github.com/WeareJH/config-gen
6 |
7 | This `r.js` build file is built for Magento 2.2.0-rc30 CE Luma theme.
8 |
9 | **NOTE**: Manual modification of the `build.js` file for your project IS NOT REQUIRED. A major benefit will be achieved by any `Magento/blank` or `Magento/luma`-based installation with this build configuration without the need for any modifications. Tweaking the `build.js` file is optional if you want to achieve 100% improvements.
10 |
11 | The Magento 2 built-in bundler relies only on PHP, which is not very efficient and could lead to potential issues. The build file `build.js` from this repository can be used to execute bundling and minification on deployed static content with the `r.js` tool shipped with the NPM version of RequireJS. It will optimize the main pages of Magento 2.
12 |
13 | The process described here should be applied only during deployment to production.
14 |
15 | ## Usage
16 | * Install [r.js](http://requirejs.org/docs/optimization.html)
17 | * Download `build.js` from this repo
18 | * Edit `build.js` to remove/add files from your custom theme to bundles (optional)
19 | * Apply [the jquery.cookie issue patch](#fixing-missconfiguration-of-jquerycookie)
20 | * Run `magento setup:static-content:deploy` to deploy Magento 2 static content to `{magentoDir}/pub/static/` folder
21 | * For every theme locale that you use:
22 | * Move `{magentoDir}/pub/static/{area}/{vendor}/{theme}/{locale}` folder to `{magentoDIr}pub/static/{area}/{vendor}/{theme}/{locale}_source`
23 | * Run `r.js -o build.js baseUrl={magentoDir}/pub/static/{area}/{vendor}/{theme}/{locale}_source dir={magentoDir}/pub/static/{area}/{vendor}/{theme}/{locale}`
24 |
25 | ## Output
26 | * Bundles all files common for all Magento 2 Luma storefront pages into `requirejs/require.js` file
27 | * Generates 5 page-specific bundle files:
28 | * `bundles/default.js` - should be added to `default` layout handle
29 | * `bundles/cart.js` - should be added to `checkout_cart_index` layout handle
30 | * `bundles/checkout.js` - should be added to `checkout_index_index` layout handle
31 | * `bundles/catalog.js` - should be added to `catalog_category_view` and `catalog_product_view` layout handles
32 | * `bundles/product.js` - should be added to `catalog_product_view` layout handle
33 |
34 | ### Adding bundles to pages
35 | To add a bundle file to the corresponding page, add following instruction to the page layout update file in your module:
36 | ```xml
37 |
38 |
39 |
40 | ```
41 |
42 | Example for cart pages, create a file `My/Module/view/frontend/layout/checkout_cart_index.xml` with the following contents:
43 | ```xml
44 |
45 |
46 |
47 |
48 |
49 |
50 | ```
51 | ### Fixing missconfiguration of jquery.cookie
52 | JQuery.cookie module should be added to 'deps'. To add, create a 'requiejs-config.js' file in your module:
53 | ```javascript
54 | //My/Module/view/frontend/requirejs-config.js
55 | var config = {
56 | 'deps': ['jquery/jquery.cookie']
57 | };
58 | ```
59 |
--------------------------------------------------------------------------------
/build.js:
--------------------------------------------------------------------------------
1 | {
2 | // Enable js minification with Uglify. Uncomment this out during development tomake builds faster
3 | //optimize: 'none',
4 | inlineText: true,
5 | // Files that are required for all pages will be included in require.js file
6 | deps: [
7 | 'jquery/jquery.cookie',
8 | 'jquery/jquery-migrate',
9 | 'jquery/jquery.mobile.custom',
10 | 'mage/common',
11 | 'mage/dataPost',
12 | 'mage/bootstrap',
13 | 'mage/translate-inline',
14 | 'Magento_Theme/js/responsive',
15 | 'Magento_Theme/js/theme',
16 | ],
17 | // Shim configuration for non-AMD modules. Copied from requirejs-config
18 | shim: {
19 | 'jquery/jquery.storageapi.min': ['jquery/jquery.cookie'],
20 | 'jquery/jquery-migrate': ['jquery'],
21 | 'jquery/jquery.hashchange': ['jquery', 'jquery/jquery-migrate'],
22 | 'jquery/jstree/jquery.hotkeys': ['jquery'],
23 | 'jquery/hover-intent': ['jquery'],
24 | 'mage/adminhtml/backup': ['prototype'],
25 | 'mage/captcha': ['prototype'],
26 | 'mage/common': ['jquery'],
27 | 'mage/new-gallery': ['jquery'],
28 | 'mage/webapi': ['jquery'],
29 | 'jquery/ui': ['jquery'],
30 | 'MutationObserver': ['es6-collections'],
31 | 'tinymce': {
32 | 'exports': 'tinymce'
33 | },
34 | 'moment': {
35 | 'exports': 'moment'
36 | },
37 | 'matchMedia': {
38 | 'exports': 'mediaCheck'
39 | }
40 | },
41 | // Copied from requirejs-config to load modules for bundling correctly
42 | paths: {
43 | 'jquery/ui': 'jquery/jquery-ui',
44 | 'jquery/validate': 'jquery/jquery.validate',
45 | 'jquery/hover-intent': 'jquery/jquery.hoverIntent',
46 | 'jquery/file-uploader': 'jquery/fileUploader/jquery.fileupload-fp',
47 | 'jquery/jquery.hashchange': 'jquery/jquery.ba-hashchange.min',
48 | 'jquery/jquery-storageapi': 'jquery/jquery.storageapi.min',
49 | 'prototype': 'legacy-build.min',
50 | 'text': 'requirejs/text',
51 | 'domReady': 'requirejs/domReady',
52 | 'tinymce': 'tiny_mce/tiny_mce_src',
53 | 'ui/template': 'Magento_Ui/templates',
54 | },
55 | // Copied from requirejs-config to load modules for bundling correctly
56 | map: {
57 | "*": {
58 | ko: 'knockoutjs/knockout',
59 | knockout: 'knockoutjs/knockout',
60 | mageUtils: 'mage/utils/main',
61 | rowBuilder: 'Magento_Theme/js/row-builder',
62 | toggleAdvanced: 'mage/toggle',
63 | translateInline: 'mage/translate-inline',
64 | sticky: 'mage/sticky',
65 | tabs: 'mage/tabs',
66 | zoom: 'mage/zoom',
67 | collapsible: 'mage/collapsible',
68 | dropdownDialog: 'mage/dropdown',
69 | dropdown: 'mage/dropdowns',
70 | accordion: 'mage/accordion',
71 | loader: 'mage/loader',
72 | tooltip: 'mage/tooltip',
73 | deletableItem: 'mage/deletable-item',
74 | itemTable: 'mage/item-table',
75 | fieldsetControls: 'mage/fieldset-controls',
76 | fieldsetResetControl: 'mage/fieldset-controls',
77 | redirectUrl: 'mage/redirect-url',
78 | loaderAjax: 'mage/loader',
79 | menu: 'mage/menu',
80 | popupWindow: 'mage/popup-window',
81 | validation: 'mage/validation/validation',
82 | welcome: 'Magento_Theme/js/view/welcome',
83 | uiElement: 'Magento_Ui/js/lib/core/element/element',
84 | uiCollection: 'Magento_Ui/js/lib/core/collection',
85 | uiComponent: 'Magento_Ui/js/lib/core/collection',
86 | uiClass: 'Magento_Ui/js/lib/core/class',
87 | uiEvents: 'Magento_Ui/js/lib/core/events',
88 | uiRegistry: 'Magento_Ui/js/lib/registry/registry',
89 | consoleLogger: 'Magento_Ui/js/lib/logger/console-logger',
90 | uiLayout: 'Magento_Ui/js/core/renderer/layout',
91 | buttonAdapter: 'Magento_Ui/js/form/button-adapter',
92 | rjsResolver: 'mage/requirejs/resolver',
93 | discountCode: 'Magento_Checkout/js/discount-codes',
94 | shoppingCart: 'Magento_Checkout/js/shopping-cart',
95 | regionUpdater: 'Magento_Checkout/js/region-updater',
96 | sidebar: 'Magento_Checkout/js/sidebar',
97 | checkoutLoader: 'Magento_Checkout/js/checkout-loader',
98 | checkoutData: 'Magento_Checkout/js/checkout-data',
99 | proceedToCheckout: 'Magento_Checkout/js/proceed-to-checkout',
100 | quickSearch: 'Magento_Search/form-mini',
101 | pageCache: 'Magento_PageCache/js/page-cache',
102 | wishlist: 'Magento_Wishlist/js/wishlist',
103 | addToWishlist: 'Magento_Wishlist/js/add-to-wishlist',
104 | wishlistSearch: 'Magento_Wishlist/js/search',
105 | requireCookie: 'Magento_Cookie/js/require-cookie',
106 | cookieNotices: 'Magento_Cookie/js/notices',
107 | compareList: 'Magento_Catalog/js/list',
108 | relatedProducts: 'Magento_Catalog/js/related-products',
109 | upsellProducts: 'Magento_Catalog/js/upsell-products',
110 | productListToolbarForm: 'Magento_Catalog/js/product/list/toolbar',
111 | catalogGallery: 'Magento_Catalog/js/gallery',
112 | priceBox: 'Magento_Catalog/js/price-box',
113 | priceOptionDate: 'Magento_Catalog/js/price-option-date',
114 | priceOptionFile: 'Magento_Catalog/js/price-option-file',
115 | priceOptions: 'Magento_Catalog/js/price-options',
116 | priceUtils: 'Magento_Catalog/js/price-utils',
117 | catalogAddToCart: 'Magento_Catalog/js/catalog-add-to-cart',
118 | loadPlayer: 'Magento_ProductVideo/js/load-player',
119 | fotoramaVideoEvents: 'Magento_ProductVideo/js/fotorama-add-video-events',
120 | bundleOption: 'Magento_Bundle/bundle',
121 | priceBundle: 'Magento_Bundle/js/price-bundle',
122 | slide: 'Magento_Bundle/js/slide',
123 | productSummary: 'Magento_Bundle/js/product-summary',
124 | checkoutBalance: 'Magento_Customer/js/checkout-balance',
125 | address: 'Magento_Customer/address',
126 | changeEmailPassword: 'Magento_Customer/change-email-password',
127 | passwordStrengthIndicator: 'Magento_Customer/js/password-strength-indicator',
128 | zxcvbn: 'Magento_Customer/js/zxcvbn',
129 | addressValidation: 'Magento_Customer/js/addressValidation',
130 | creditCardType: 'Magento_Payment/cc-type',
131 | addToCart: 'Magento_Msrp/js/msrp',
132 | giftMessage: 'Magento_Sales/gift-message',
133 | ordersReturns: 'Magento_Sales/orders-returns',
134 | downloadable: 'Magento_Downloadable/downloadable',
135 | orderBySkuFailure: 'Magento_AdvancedCheckout/js/order-by-sku-failure',
136 | fileChooser: 'Magento_AdvancedCheckout/js/file-chooser',
137 | configurable: 'Magento_ConfigurableProduct/js/configurable',
138 | fileElement: 'Magento_CustomerCustomAttributes/file-element',
139 | transparent: 'Magento_Payment/transparent',
140 | recentlyViewedProducts: 'Magento_Reports/js/recently-viewed',
141 | captcha: 'Magento_Captcha/captcha',
142 | catalogSearch: 'Magento_CatalogSearch/form-mini',
143 | giftOptions: 'Magento_GiftMessage/gift-options',
144 | extraOptions: 'Magento_GiftMessage/extra-options',
145 | taxToggle: 'Magento_Weee/tax-toggle',
146 | ticker: 'Magento_CatalogEvent/js/ticker',
147 | carousel: 'Magento_CatalogEvent/js/carousel',
148 | multipleWishlist: 'Magento_MultipleWishlist/js/multiple-wishlist',
149 | multiShipping: 'Magento_Multishipping/js/multi-shipping',
150 | orderOverview: 'Magento_Multishipping/js/overview',
151 | payment: 'Magento_Multishipping/js/payment',
152 | orderReview: 'Magento_Paypal/order-review',
153 | paypalCheckout: 'Magento_Paypal/js/paypal-checkout',
154 | editTrigger: 'mage/edit-trigger',
155 | addClass: 'Magento_Translation/add-class'
156 | }
157 | },
158 | // Bundles that will be generated by r.js
159 | modules: [
160 | // Bundle all dependencies common for all pages to requirejs/require.js file. The bundled file will be loaded on all pages.
161 | {
162 | name: 'requirejs/require',
163 | },
164 | // Bundle all dependencies common for all pages that have "default" handle (home, product, category, etc)
165 | // Exclude requirejs/require, as it willl be loaded in separate request.
166 | // Edit this bundle configuration if you add/remove static files in default handle.
167 | {
168 | name: 'bundles/default',
169 | create: true,
170 | include: [
171 | 'loaderAjax',
172 | 'mage/cookies',
173 | 'dropdown',
174 | 'dropdownDialog',
175 | 'text!Magento_Tax/template/checkout/minicart/subtotal/totals.html',
176 | 'text!Magento_Captcha/template/checkout/captcha.html',
177 | 'text!Magento_Checkout/template/minicart/item/price.html',
178 | 'text!Magento_Catalog/template/product/image_with_borders.html',
179 | 'text!Magento_Checkout/template/minicart/subtotal.html',
180 | 'text!Magento_Msrp/template/checkout/minicart/subtotal/totals.html',
181 | 'text!Magento_Checkout/template/minicart/item/default.html',
182 | 'text!Magento_Ui/template/messages.html',
183 | 'text!Magento_Customer/template/authentication-popup.html',
184 | 'text!Magento_Checkout/template/minicart/content.html',
185 | 'text!ui/template/collection.html',
186 | 'text!ui/template/block-loader.html',
187 | 'text!ui/template/modal/modal-custom.html',
188 | 'text!ui/template/modal/modal-slide.html',
189 | 'text!ui/template/modal/modal-popup.html',
190 | 'text!ui/template/tooltip/tooltip.html',
191 | 'Magento_Ui/js/core/app',
192 | 'Magento_Customer/js/view/customer',
193 | 'Magento_Msrp/js/view/checkout/minicart/subtotal/totals',
194 | 'Magento_Tax/js/view/checkout/minicart/subtotal/totals',
195 | 'Magento_Catalog/js/view/image',
196 | 'uiComponent',
197 | 'Magento_Checkout/js/view/minicart',
198 | 'Magento_Ui/js/block-loader',
199 | 'quickSearch',
200 | 'Magento_Catalog/js/view/compare-products',
201 | 'tabs',
202 | 'menu',
203 | 'Magento_Theme/js/view/messages',
204 | 'Magento_Customer/js/view/authentication-popup',
205 | 'Magento_Ui/js/view/messages',
206 | 'Magento_Captcha/js/view/checkout/loginCaptcha',
207 | 'Magento_Ui/js/block-loader',
208 | 'Magento_Customer/js/section-config',
209 | 'Magento_Customer/js/customer-data',
210 | 'Magento_Customer/js/invalidation-processor',
211 | 'Magento_Customer/js/invalidation-rules/website-rule',
212 | 'pageCache',
213 | 'validation',
214 | 'Magento_Catalog/js/storage-manager',
215 | 'Magento_Wishlist/js/view/wishlist',
216 | 'Magento_Sales/js/view/last-ordered-items'
217 | ],
218 | exclude: [
219 | 'requirejs/require'
220 | ]
221 | },
222 | // Cart page bundle
223 | {
224 | name: 'bundles/cart',
225 | create: true,
226 | include: [
227 | 'Magento_Ui/js/form/element/abstract',
228 | 'Magento_Dhl/js/view/shipping-rates-validation',
229 | 'Magento_Fedex/js/view/shipping-rates-validation',
230 | 'Magento_OfflineShipping/js/view/shipping-rates-validation/freeshipping',
231 | 'Magento_OfflineShipping/js/view/shipping-rates-validation/flatrate',
232 | 'Magento_OfflineShipping/js/view/shipping-rates-validation/tablerate',
233 | 'Magento_Ups/js/view/shipping-rates-validation',
234 | 'Magento_Usps/js/view/shipping-rates-validation',
235 | 'Magento_Checkout/js/view/cart/shipping-rates',
236 | 'Magento_Tax/js/view/checkout/shipping_method/price',
237 | 'Magento_Checkout/js/view/cart/shipping-estimation',
238 | 'Magento_Ui/js/form/element/select',
239 | 'Magento_Ui/js/form/element/region',
240 | 'Magento_Checkout/js/view/cart/totals',
241 | 'Magento_Tax/js/view/checkout/summary/subtotal',
242 | 'Magento_Tax/js/view/checkout/cart/totals/shipping',
243 | 'Magento_Tax/js/view/checkout/cart/totals/grand-total',
244 | 'Magento_SalesRule/js/view/cart/totals/discount',
245 | 'Magento_Tax/js/view/checkout/cart/totals/tax',
246 | 'Magento_Weee/js/view/cart/totals/weee',
247 | 'Magento_Checkout/js/proceed-to-checkout',
248 | 'Magento_Checkout/js/shopping-cart',
249 | 'Magento_GiftMessage/js/view/gift-message',
250 | 'Magento_GiftMessage/js/view/gift-message',
251 | 'discountCode',
252 | 'sticky',
253 | 'text!Magento_Checkout/template/cart/totals.html',
254 | 'text!Magento_Tax/template/checkout/summary/subtotal.html',
255 | 'text!Magento_Tax/template/checkout/cart/totals/shipping.html',
256 | 'text!Magento_Tax/template/checkout/cart/totals/grand-total.html',
257 | 'text!Magento_Tax/template/checkout/cart/totals/tax.html',
258 | 'text!Magento_GiftMessage/template/gift-message-item-level.html',
259 | 'text!Magento_GiftMessage/template/gift-message-form.html',
260 | 'text!Magento_GiftMessage/template/gift-message.html',
261 | 'text!Magento_GiftMessage/template/gift-message-form.html',
262 | 'text!Magento_Weee/template/checkout/summary/weee.html',
263 | 'text!Magento_SalesRule/template/cart/totals/discount.html',
264 | 'text!Magento_Checkout/template/cart/shipping-rates.html',
265 | 'text!Magento_Checkout/template/cart/shipping-estimation.html',
266 | 'text!Magento_Tax/template/checkout/shipping_method/price.html',
267 | 'text!ui/template/form/field.html',
268 | 'text!ui/template/form/element/select.html',
269 | 'text!ui/template/form/element/input.html'
270 | ],
271 | exclude: [
272 | 'bundles/default',
273 | 'requirejs/require'
274 | ]
275 | },
276 | // Checkout bundle. Default bundle is not loaded on checkout
277 | // Edit this bundle if you customize checkout
278 | {
279 | name: 'bundles/checkout',
280 | create: true,
281 | include: [
282 | 'loaderAjax',
283 | 'mage/cookies',
284 | 'dropdown',
285 | 'Magento_Ui/js/core/app',
286 | 'Magento_Customer/js/view/authentication-popup',
287 | 'Magento_Ui/js/view/messages',
288 | 'Magento_Captcha/js/view/checkout/loginCaptcha',
289 | 'Magento_Ui/js/block-loader',
290 | 'Magento_Customer/js/section-config',
291 | 'Magento_Customer/js/customer-data',
292 | 'Magento_Customer/js/invalidation-processor',
293 | 'Magento_Customer/js/invalidation-rules/website-rule',
294 | 'pageCache',
295 | 'checkoutLoader',
296 | 'uiComponent',
297 | 'Magento_Payment/js/view/payment/payments',
298 | 'Magento_OfflinePayments/js/view/payment/offline-payments',
299 | 'Magento_Paypal/js/view/payment/paypal-payments',
300 | 'Magento_Checkout/js/view/payment/email-validator',
301 | 'Magento_CheckoutAgreements/js/view/agreement-validation',
302 | 'Magento_Checkout/js/view/form/element/email',
303 | 'Magento_Checkout/js/view/payment/list',
304 | 'Magento_CheckoutAgreements/js/view/checkout-agreements',
305 | 'Magento_Checkout/js/view/billing-address',
306 | 'Magento_Ui/js/form/element/select',
307 | 'Magento_Ui/js/form/element/region',
308 | 'Magento_Ui/js/form/element/abstract',
309 | 'Magento_Ui/js/form/components/group',
310 | 'Magento_Checkout/js/view/billing-address',
311 | 'Magento_SalesRule/js/view/payment/discount',
312 | 'Magento_SalesRule/js/view/payment/discount-messages',
313 | 'Magento_Checkout/js/view/payment',
314 | 'Magento_OfflineShipping/js/view/shipping-rates-validation/flatrate',
315 | 'Magento_Checkout/js/view/shipping',
316 | 'Magento_Checkout/js/view/form/element/email',
317 | 'Magento_Captcha/js/view/checkout/loginCaptcha',
318 | 'Magento_Checkout/js/view/shipping-address/list',
319 | 'Magento_Shipping/js/view/checkout/shipping/shipping-policy',
320 | 'Magento_Tax/js/view/checkout/shipping_method/price',
321 | 'Magento_Ui/js/view/messages',
322 | 'Magento_Checkout/js/view/authentication',
323 | 'Magento_Checkout/js/view/authentication-messages',
324 | 'Magento_Captcha/js/view/checkout/loginCaptcha',
325 | 'Magento_Checkout/js/view/progress-bar',
326 | 'Magento_Checkout/js/view/estimation',
327 | 'Magento_Checkout/js/view/sidebar',
328 | 'Magento_Checkout/js/view/summary',
329 | 'Magento_Checkout/js/view/summary/totals',
330 | 'Magento_Tax/js/view/checkout/summary/subtotal',
331 | 'Magento_Tax/js/view/checkout/summary/shipping',
332 | 'Magento_Tax/js/view/checkout/summary/grand-total',
333 | 'Magento_Tax/js/view/checkout/summary/tax',
334 | 'Magento_Weee/js/view/checkout/summary/weee',
335 | 'Magento_SalesRule/js/view/summary/discount',
336 | 'Magento_Checkout/js/view/summary/cart-items',
337 | 'Magento_Checkout/js/view/summary/item/details',
338 | 'Magento_Checkout/js/view/summary/item/details/thumbnail',
339 | 'Magento_Tax/js/view/checkout/summary/item/details/subtotal',
340 | 'Magento_Weee/js/view/checkout/summary/item/price/row_incl_tax',
341 | 'Magento_Weee/js/view/checkout/summary/item/price/row_excl_tax',
342 | 'Magento_Checkout/js/view/shipping-information',
343 | 'Magento_Checkout/js/view/shipping-information/list',
344 | 'Magento_Checkout/js/model/payment/method-group',
345 | 'mage/url',
346 | 'Magento_Ui/js/block-loader',
347 | 'Magento_Checkout/js/view/shipping-information/address-renderer/default',
348 | 'Magento_Catalog/js/storage-manager',
349 | 'Magento_OfflineShipping/js/view/shipping-rates-validation/tablerate',
350 | 'Magento_Checkout/js/view/shipping-address/address-renderer/default',
351 | 'Magento_Checkout/js/view/payment/default',
352 | 'Magento_Checkout/js/action/redirect-on-success',
353 | 'Magento_Checkout/js/action/place-order',
354 | 'text!Magento_Checkout/template/payment/before-place-order.html',
355 | 'text!Magento_Checkout/template/estimation.html',
356 | 'text!Magento_Checkout/template/sidebar.html',
357 | 'text!Magento_Checkout/template/summary.html',
358 | 'text!Magento_Checkout/template/summary/totals.html',
359 | 'text!Magento_Checkout/template/onepage.html',
360 | 'text!Magento_Customer/template/authentication-popup.html',
361 | 'text!Magento_Checkout/template/authentication.html',
362 | 'text!Magento_Checkout/template/progress-bar.html',
363 | 'text!Magento_Checkout/template/shipping-information.html',
364 | 'text!Magento_Captcha/template/checkout/captcha.html',
365 | 'text!Magento_Checkout/template/summary/cart-items.html',
366 | 'text!Magento_Checkout/template/shipping.html',
367 | 'text!Magento_Checkout/template/payment.html',
368 | 'text!Magento_Checkout/template/summary/item/details.html',
369 | 'text!Magento_Checkout/template/form/element/email.html',
370 | 'text!Magento_Checkout/template/shipping-address/list.html',
371 | 'text!Magento_Checkout/template/shipping-address/form.html',
372 | 'text!Magento_Shipping/template/checkout/shipping/shipping-policy.html',
373 | 'text!Magento_Checkout/template/payment-methods/list.html',
374 | 'text!Magento_SalesRule/template/payment/discount.html',
375 | 'text!Magento_Checkout/template/shipping-address/shipping-method-list.html',
376 | 'text!Magento_Checkout/template/summary/item/details/thumbnail.html',
377 | 'text!Magento_Tax/template/checkout/summary/item/details/subtotal.html',
378 | 'text!Magento_Checkout/template/shipping-address/shipping-method-item.html',
379 | 'text!Magento_Weee/template/checkout/summary/item/price/row_excl_tax.html',
380 | 'text!Magento_Tax/template/checkout/shipping_method/price.html',
381 | 'text!Magento_Ui/template/messages.html',
382 | 'text!Magento_Checkout/template/shipping-address/address-renderer/default.html',
383 | 'text!Magento_Checkout/template/shipping-information/address-renderer/default.html',
384 | 'text!Magento_Checkout/template/shipping-information/list.html',
385 | 'text!Magento_Checkout/template/billing-address.html',
386 | 'text!Magento_Checkout/template/billing-address/details.html',
387 | 'text!Magento_Checkout/template/billing-address/list.html',
388 | 'text!Magento_Checkout/template/billing-address/form.html',
389 | 'text!Magento_Tax/template/checkout/summary/subtotal.html',
390 | 'text!Magento_SalesRule/template/summary/discount.html',
391 | 'text!Magento_Tax/template/checkout/summary/shipping.html',
392 | 'text!Magento_Weee/template/checkout/summary/weee.html',
393 | 'text!Magento_Tax/template/checkout/summary/tax.html',
394 | 'text!Magento_Tax/template/checkout/summary/grand-total.html',
395 | 'text!Magento_CheckoutAgreements/template/checkout/checkout-agreements.html',
396 | 'text!ui/template/form/element/helper/tooltip.html',
397 | 'text!ui/template/form/element/input.html',
398 | 'text!ui/template/form/element/select.html',
399 | 'text!ui/template/collection.html',
400 | 'text!ui/template/block-loader.html',
401 | 'text!ui/template/form/field.html',
402 | 'text!ui/template/group/group.html',
403 | ],
404 | exclude: [
405 | 'requirejs/require'
406 | ]
407 | },
408 | // Bundle for all catalog pages (Category, Product)
409 | {
410 | name: 'bundles/catalog',
411 | create: true,
412 | include: [
413 | 'addToWishlist',
414 | 'requireCookie',
415 | 'priceBox',
416 | 'Magento_Swatches/js/swatch-renderer',
417 | 'Magento_Swatches/js/catalog-add-to-cart',
418 | 'catalogAddToCart',
419 | 'productListToolbarForm',
420 | 'accordion'
421 | ],
422 | exclude: [
423 | 'bundles/default',
424 | 'requirejs/require'
425 | ]
426 | },
427 | // Product page bundle
428 | {
429 | name: 'bundles/product',
430 | create: true,
431 | include: [
432 | 'Magento_Catalog/js/validate-product',
433 | 'magnifier/magnify',
434 | 'Magento_ProductVideo/js/fotorama-add-video-events',
435 | 'Magento_Review/js/error-placement',
436 | 'Magento_Review/js/process-reviews',
437 | 'Magento_Catalog/js/product/view/provider',
438 | 'Magento_Review/js/view/review',
439 | 'mage/gallery/gallery',
440 | 'priceBundle',
441 | 'sticky',
442 | 'productSummary',
443 | 'slide'
444 | ],
445 | exclude: [
446 | 'bundles/default',
447 | 'bundles/catalog',
448 | 'requirejs/require'
449 | ]
450 | }
451 | ]
452 | }
453 |
--------------------------------------------------------------------------------