Skip to content

Commit a0982ec

Browse files
committed
[Encore] Adding more FAQs for #8072
1 parent 807b83f commit a0982ec

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

Diff for: frontend.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Guides
6464
Troubleshooting
6565
...............
6666

67-
* :doc:`FAQ </frontend/encore/faq>`
67+
* :doc:`FAQ & Common Issues </frontend/encore/faq>`
6868

6969
Full API
7070
........

Diff for: frontend/encore/faq.rst

+21-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
Frequently Asked Questions
2-
==========================
1+
FAQ and Common Issues
2+
=====================
33

44
My App Lives under a Subdirectory
55
---------------------------------
66

7-
My app doesn't live at the root of my web server: it lives under a subdirectory
8-
(e.g. ``/myAppSubdir/``). How can I configure Encore to work?
9-
10-
If your app lives under a subdirectory, you just need to include that when calling
11-
``Encore.setPublicPrefix()``:
7+
If your app does not live at the root of your web server (i.e. it lives under a subdirectory,
8+
like ``/myAppSubdir``), you just need to configure that when calling ``Encore.setPublicPrefix()``:
129

1310
.. code-block:: diff
1411
@@ -37,3 +34,20 @@ final paths:
3734
"build/app.js": "/myAppSubdir/build/app.123abc.js",
3835
"build/dashboard.css": "/myAppSubdir/build/dashboard.a4bf2d.css"
3936
}
37+
38+
"jQuery is not defined" or "$ is not defined"
39+
---------------------------------------------
40+
41+
This error happens when your code (or some library that you are using) expects ``$``
42+
or ``jQuery`` to be a global variable. But, when you use Webpack and ``require('jquery')``,
43+
no global variables are set.
44+
45+
The fix depends on if the error is happening in your code or inside some third-party
46+
code that you're using. See :doc:`/frontend/encore/legacy-apps` for the fix.
47+
48+
Uncaught ReferenceError: webpackJsonp is not defined
49+
----------------------------------------------------
50+
51+
If you get this error, it's probably because you've just added a :doc:`shared entry </frontend/encore/shared-entry>`
52+
but you *forgot* to add a ``script`` tag for the new ``manifest.js`` file. See the
53+
information about the :ref:`script tags <encore-shared-entry-script>` in that section.

Diff for: frontend/encore/shared-entry.rst

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ that's included on every page:
2727
As soon as you make this change, you need to include two extra JavaScript files
2828
on your page before any other JavaScript file:
2929

30+
.. _encore-shared-entry-script:
31+
3032
.. code-block:: twig
3133
3234
<!-- these two files now must be included in every page -->

0 commit comments

Comments
 (0)