-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Updating {% block javascripts position to match recipe change #14836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
javiereguiluz
merged 1 commit into
symfony:4.4
from
weaverryan:changing-javascripts-block-position
Jan 17, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,18 +104,18 @@ can do most of the work for you: | |
<!-- Renders a link tag (if your module requires any CSS) | ||
<link rel="stylesheet" href="/build/app.css"> --> | ||
{% endblock %} | ||
</head> | ||
<body> | ||
<!-- ... --> | ||
|
||
{% block javascripts %} | ||
{{ encore_entry_script_tags('app') }} | ||
|
||
<!-- Renders app.js & a webpack runtime.js file | ||
<script src="/build/runtime.js"></script> | ||
<script src="/build/app.js"></script> --> | ||
<script src="/build/runtime.js" defer></script> | ||
<script src="/build/app.js" defer></script> | ||
See note below about the "defer" attribute --> | ||
{% endblock %} | ||
</body> | ||
</head> | ||
|
||
<!-- ... --> | ||
</html> | ||
|
||
.. _encore-entrypointsjson-simple-description: | ||
|
@@ -135,11 +135,14 @@ If you're *not* using Symfony, you can ignore the ``entrypoints.json`` file and | |
point to the final, built file directly. ``entrypoints.json`` is only required for | ||
some optional features. | ||
|
||
.. versionadded:: 0.21.0 | ||
.. versionadded:: 1.9.0 | ||
|
||
The ``encore_entry_link_tags()`` comes from WebpackEncoreBundle and relies | ||
on a feature in Encore that was first introduced in version 0.21.0. Previously, | ||
the ``asset()`` function was used to point directly to the file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old note had probably been there long enough - so I just replaced it with the new one |
||
The ``defer`` attribute on the ``script`` tags delays the execution of the | ||
JavaScript until the page loads (similar to putting the ``script`` at the | ||
bottom of the page). The ability to always add this attribute was introduced | ||
in WebpackEncoreBundle 1.9.0 and is automatically enabled in that bundle's | ||
recipe in the ``config/packages/webpack_encore.yaml`` file. See | ||
`WebpackEncoreBundle Configuration`_ for more details. | ||
|
||
Requiring JavaScript Modules | ||
---------------------------- | ||
|
@@ -355,3 +358,4 @@ Encore supports many more features! For a full list of what you can do, see | |
|
||
.. _`Encore's index.js file`: https://github.com/symfony/webpack-encore/blob/master/index.js | ||
.. _`ECMAScript 6 modules`: https://hacks.mozilla.org/2015/08/es6-in-depth-modules/ | ||
.. _`WebpackEncoreBundle Configuration`: https://github.com/symfony/webpack-encore-bundle#configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.