-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Various Encore updates #8084
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
Merged
Various Encore updates #8084
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3d9905e
Add docs for custom loaders
pierredup 0ff1c3c
Add missing link to handlebars-loader
pierredup 62dd63e
Adding docs about adding custom config - see #8067
weaverryan 8b0a22a
[Encore] Adding docs about deploying to a subdirectory - see #8069
weaverryan a099bff
Documenting (better) how to expose global variables - see #8071
weaverryan 807b83f
[Encore] Documenting addPlugin - see #8070
weaverryan a0982ec
[Encore] Adding more FAQs for #8072
weaverryan f5c22a6
minor rewording
weaverryan f8461d3
adding anotehr faq for old packages without a main script
weaverryan 15e816e
Tweaks thanks to Javier
weaverryan 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
[Encore] Adding docs about deploying to a subdirectory - see #8069
- Loading branch information
commit 8b0a22afb9310dec7e0834da57d58cdfeae60312
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Frequently Asked Questions | ||
========================== | ||
|
||
My App Lives under a Subdirectory | ||
--------------------------------- | ||
|
||
My app doesn't live at the root of my web server: it lives under a subdirectory | ||
(e.g. ``/myAppSubdir/``). How can I configure Encore to work? | ||
|
||
If your app lives under a subdirectory, you just need to include that when calling | ||
``Encore.setPublicPrefix()``: | ||
|
||
.. code-block:: diff | ||
|
||
// webpack.config.js | ||
Encore | ||
// ... | ||
|
||
.setOutputPath('web/build/') | ||
|
||
- .setPublicPath('/build') | ||
+ // this is your *true* public path | ||
+ .setPublicPath('/myAppSubdir/build') | ||
|
||
+ // this is now needed so that your manifest.json keys are still `build/foo.js` | ||
+ // i.e. you won't need to change anything in your Symfony app | ||
+ config.setManifestKeyPrefix('build') | ||
; | ||
|
||
If you're :ref:`processing your assets through manifest.json <load-manifest-files>`, | ||
you're done! The ``manifest.json`` file will now include the subdirectory in the | ||
final paths: | ||
|
||
.. code-block:: json | ||
|
||
{ | ||
"build/app.js": "/myAppSubdir/build/app.123abc.js", | ||
"build/dashboard.css": "/myAppSubdir/build/dashboard.a4bf2d.css" | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config
should not be here, as you add this in a chain call (and there is noconfig
variable)