Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Advanced JS Bundling examples can lead to problems with JS execution #6025

Closed
k4emic opened this issue Nov 19, 2019 · 0 comments · Fixed by #6026
Closed

Advanced JS Bundling examples can lead to problems with JS execution #6025

k4emic opened this issue Nov 19, 2019 · 0 comments · Fixed by #6026
Assignees

Comments

@k4emic
Copy link

k4emic commented Nov 19, 2019

General issue

Description:

Using the current guide to setup JS bundling can lead to bundles which include domReady! in the bundle.

This results in the main bundle to be included multiple times on the page, which can cause problems with jQuery and other javascript components.

domReady! is included due to the manual writing of the bundle configuration, which doesn't filter out undesireable content (which bundlesConfigOutFile does for some reason).

Possible solutions:

Using bundlesConfigOutFile doesn't exhibit this behavior.

Additional information:

Example config

# build.js

modules: [
    {
        name: 'requirejs/require'
    },
    {
        name: 'mage/bootstrap',
        include: [
            ....
        ]
    }
]
# requirejs-config.js

require.config({
   bundles: {"requirejs/require":[...,"requirejs/domReady","domReady!",...]},
});require.config({
   bundles: {"mage/bootstrap": [....]},
});
....

DOM HTML, after JS has been allowed to run

<head>
...
<script type="text/javascript" src="THEME_URL/da_DK/requirejs/require.js"></script>

...
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="domReady!" src="THEME_URL/da_DK/requirejs/require.js"></script>
k4emic pushed a commit to k4emic/devdocs that referenced this issue Nov 19, 2019
@m2-community-project m2-community-project bot assigned k4emic and unassigned k4emic Nov 19, 2019
keharper added a commit that referenced this issue Nov 27, 2019
* Update first-time-setup-import-import.md

* adding new information from stopwords elasticsearch

* settings

* settings

* settings spaces

* settings by MD029

* settings by MD029

* adding variable from github url tree

* adding url variable

* adding fix MD009

* Using the /search endpoint

* Update rest-api.yml

* Update search-endpoint.md

* Update search-endpoint.md

* Updates as per request points

* Symlink for v2.3

* Symlink modification

* Updated repo path

* Update search-endpoint.md

* Fixed double quotes.

* Google 3.0.2 - RN

Initial Draft

* Outline differences between search types and v1/search and v1/products

* Update search-endpoint.md

* Added PHP note

added a note regarding required PHP setting for Google reCAPTCHA. This update was vetted and approved by Rick Tempesta.

* Update guides/v2.3/security/google-recaptcha.md

Accepted approver's suggestion

Co-Authored-By: Shrie Spangler <spangler@adobe.com>

* fixed broken link

* removing variable and remove link for example

* Added JS script name resolution examples

* Fixed incorrect syntax for custom KO checked binding

* Added missing example for i18n Magento binding syntax

* Incorrect reference url fixed

The reference url was pointing to Customer/Api instead of Catalog/Api

* Fixing the LESS snippet syntax

* Added note for ece-tools patch process fix (#6004)

* Added fix for patch process issue introduced
  by version scheme change for 
  security only patches in Magento 2.3.2-p2.

* Updates yml. Delete unused file.

* Fixed typo.

* Linting

* Grammar and formatting

* Trailing space

* Trailing spaces

* Google 3.0.2 updates

release notes, release, compatibility.

* Markdown linting: Enable rule MD036 (emphasis used instead of a header) (#6023)

* Added colons to common psuedo-headers

* Added colons to less common psuedo headers

* Added colons to more less common psuedo headers

* Removed emphasis from captions

* Fixed up links.

* Added note for ece-tools patch process fix (#6004) (#6020)

* Added fix for patch process issue introduced
  by version scheme change for
  security only patches in Magento 2.3.2-p2.

* Corrected RESOURCE_CONFIGURATION merge example (#6005)

* Fixes #6025

* updated compatible versions

added 2.3.3

* Update extensions/google-shopping-ads/release-notes/index.md

Co-Authored-By: Shrie Spangler <spangler@adobe.com>

* Update extensions/google-shopping-ads/release-notes/index.md

Co-Authored-By: Shrie Spangler <spangler@adobe.com>

* Grammar and formatting

* magento/devdocs#: Cloud. Set ADMIN_URL via magneto-cloud command-line tool (#5971)

* magento/devdocs#: Cloud. Set ADMIN_URL via magneto-cloud command line tool

- https://devdocs.magento.com/guides/v2.2/cloud/env/environment-vars_magento.html
- https://devdocs.magento.com/guides/v2.3/cloud/env/environment-vars_magento.html

* magento/devdocs#: Cloud. Set ADMIN_URL via magneto-cloud command line tool

* Update rake build:prod

Add init task to prerequisites.

* Adding question mark when nullable value is declared

* Adding nullable param question mark in v2.2

* #5632: Incorrect link to JSCS site.

https://devdocs.magento.com/guides/v2.2/coding-standards/code-standard-javascript.html
https://devdocs.magento.com/guides/v2.3/coding-standards/code-standard-javascript.html

* Updated What's New with changes since November 4 (#6030)

* Updated What's New with changes since November 4

* Merge UI component PRs (#6041)

* Update Paging UI component documentation (#6039)

* Update Paging UI component documentation

* Grammar updates

* Update DragAndDrop UI component documentation (#6038)

* Update DragAndDrop UI component documentation

* Grammar updates

* Update date column UI component documentation (#6037)

* Update date column UI component documentation

* Grammar update

* Update ui columns documentation (#6036)

* Update ui columns documentation

* Adjust the example title

* Grammar updates

* Update UI column component documentation (#6034)

* Update UI column component documentation

* Update ui-column.md

* fixed linting error

* removing Google 3.0.2 info

will republish when 3.0.2 is released.

* update whatsnew

remove google 3.0.2 release notes from whatsnew

* magento/devdocs#: Add customerOrders query API errors

- https://devdocs.magento.com/guides/v2.3/graphql/queries/customer-orders.html

* magento/devdocs#: Add customerDownloadableProducts query API errors

- https://devdocs.magento.com/guides/v2.3/graphql/queries/customer-downloadable-products.html

* Optimized Index Management screen capture (#6050)

* Updated Architecture topic for Starter plan (#6043)

Per @jefflathan1:  Starter stores are not entitled to TAms in the same way that Pro stores are. We need to remove the Technical Account Manager entry for Starter, leaving it blank.

* #5218: Need info about structures in Adding a custom indexer (#6042)

* #5218:  Need info about structures in Adding a custom indexer

https://devdocs.magento.com/guides/v2.2/extension-dev-guide/indexing-custom.html
https://devdocs.magento.com/guides/v2.3/extension-dev-guide/indexing-custom.html

* Grammar updates

@atwixfirster I made many grammatical changes. Please review my changes, especially the `shared_index`  description,

* Updating Fieldset UiComponent documentation (#6045)

* Adding the Fieldset UiComponent additional information

* Updating the example

* Minor adjustments

* Update ui-fieldset.md

* Update view-models.md

I wasn't closing a tag page

* GraphQL caching with Fastly (#6031)

* GraphQL caching with Fastly

* Update guides/v2.3/graphql/caching.md

Co-Authored-By: Margaret Eker <meker@adobe.com>

* Added steps to check Fastly version on Cloud

* Fixed syntax

* Apply suggestions from code review

* Editorial fixes

* Apply suggestions from code review

Co-Authored-By: Margaret Eker <meker@adobe.com>

* Delete space at end of sentence

* Update caching.md

* GraphQL: small changes (#6052)

* removing cloud bi from toc

* Editorial fix (#6054)

* GraphQL caching with Fastly

* Update guides/v2.3/graphql/caching.md

Co-Authored-By: Margaret Eker <meker@adobe.com>

* Added steps to check Fastly version on Cloud

* Fixed syntax

* Apply suggestions from code review

* Editorial fixes

* Apply suggestions from code review

Co-Authored-By: Margaret Eker <meker@adobe.com>

* Delete space at end of sentence

* Update caching.md

* Editorial fix

* Add MBI to search and update site switcher (#6062)

* KB migration: Restore an environment (#6063)

* Added new topic and TOC entry

* Added files

* Added optimized images

* Fixed markdown

* Rewrote content

* Fixed links

* Fixed MD errors

* Added xref to new topic

* Fixed xref

* Apply suggestions from code review

Co-Authored-By: hguthrie <hguthrie@users.noreply.github.com>

* Revised per peer review

* Missed a var

* Apply suggestions from code review

Co-Authored-By: Margaret Eker <meker@adobe.com>

* Fixed incorrect terminology and added references

* Converting the Display Magento error report number KB to devdocs (#6061)

* Converting the Display Magento error report number KB to devdocs

* ElasticSearch: Nigix proxy config correction

* Set warning for STATIC_CONTENT_SYMLINK variable (#6065)

* Add STATIC_CONTENT_SYMLINK removal note

* Remove ece-version tool

* Add additional note

* Add supported service versions of RabbitMQ

From the platform.sh docs https://docs.platform.sh/configuration/services/rabbitmq.html

* Updating cli documentation

* Add link to supported version list

* Remove remote_markdown completely

* Fix site variable

* Add example for local RabbitMQ Management UI

* Little changes

* Update guides/v2.2/mtf/configuration.md

Editorial fix

Co-Authored-By: Kevin Harper <keharper@users.noreply.github.com>

* Update guides/v2.2/mtf/configuration.md

Editorial fix

Co-Authored-By: Kevin Harper <keharper@users.noreply.github.com>

* Update guides/v2.2/mtf/configuration.md

Editorial fix

Co-Authored-By: Kevin Harper <keharper@users.noreply.github.com>

* Update guides/v2.2/mtf/mtf_entities/mtf_handler.md

Editorial fix

Co-Authored-By: Kevin Harper <keharper@users.noreply.github.com>

* Fix style

* Small formatting change.

* Resolve code quotation error. (#6072)

* Add docs for new Adobe-generated alert policies for New Relic (#6075)

- Updated New Relic topic to add Adobe-generated alert policies
- Added information about New Relic monitoring to the
following topics: Architecture, and Go Live checklist
- Added new Monitor Performance topic to Manage Project section
- Added images for New Relic alert policies and project credentials

* fix linting error
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant