1
- Frequently Asked Questions
2
- ==========================
1
+ FAQ and Common Issues
2
+ =====================
3
3
4
4
My App Lives under a Subdirectory
5
5
---------------------------------
6
6
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() ``:
12
9
13
10
.. code-block :: diff
14
11
@@ -37,3 +34,20 @@ final paths:
37
34
"build/app.js" : " /myAppSubdir/build/app.123abc.js" ,
38
35
"build/dashboard.css" : " /myAppSubdir/build/dashboard.a4bf2d.css"
39
36
}
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.
0 commit comments