Skip to content

Commit c737732

Browse files
committed
minor #8494 Changes manifest file extension from json to js. (Cifixie)
This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #8494). Discussion ---------- Changes manifest file extension from json to js. JSON as itself isn't valid Javascript causing an error when trying to parse as javascript: `manifest.json:2 Uncaught SyntaxError: Unexpected token :` and it's only meant for Symfony asset versioning. The bundler also creates `manifest.js` -file which creates `window.webpackJsonp` used in bundles. Without it, you might get an error: `app.315f91d41365513eb8ea.js:1 Uncaught ReferenceError: webpackJsonp is not defined` Commits ------- 5d13c37 Changes manifest file extension from json to js.
2 parents 4efb6e8 + 5d13c37 commit c737732

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/encore/shared-entry.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on your page before any other JavaScript file:
3232
.. code-block:: twig
3333
3434
<!-- these two files now must be included in every page -->
35-
<script src="{{ asset('build/manifest.json') }}"></script>
35+
<script src="{{ asset('build/manifest.js') }}"></script>
3636
<script src="{{ asset('build/vendor.js') }}"></script>
3737
3838
<!-- here you link to the specific JS files needed by the current page -->
@@ -42,7 +42,7 @@ on your page before any other JavaScript file:
4242
<link rel="stylesheet" href="{{ asset('build/vendor.css') }}" />
4343
4444
The ``vendor.js`` file contains all the common code that has been extracted from
45-
the other files, so it's obvious that it must be included. The other file (``manifest.json``)
45+
the other files, so it's obvious that it must be included. The other file (``manifest.js``)
4646
is less obvious: it's needed so that Webpack knows how to load those shared modules.
4747

4848
.. tip::

0 commit comments

Comments
 (0)