Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7bfd917

Browse filesBrowse files
committed
Merge branch '4.2' into 4.3
* 4.2: fix encore multiple configuration build paths
2 parents f043881 + b96f9af commit 7bfd917
Copy full SHA for 7bfd917

File tree

1 file changed

+7
-7
lines changed
Filter options

1 file changed

+7
-7
lines changed

‎frontend/encore/advanced-config.rst

Copy file name to clipboardExpand all lines: frontend/encore/advanced-config.rst
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ state of the current configuration to build a new one:
6363
6464
// define the first configuration
6565
Encore
66-
.setOutputPath('public/build/')
67-
.setPublicPath('/build')
66+
.setOutputPath('public/build/first_build/')
67+
.setPublicPath('/build/first_build')
6868
.addEntry('app', './assets/js/app.js')
6969
.addStyleEntry('global', './assets/css/global.scss')
7070
.enableSassLoader()
@@ -83,8 +83,8 @@ state of the current configuration to build a new one:
8383
8484
// define the second configuration
8585
Encore
86-
.setOutputPath('public/build/')
87-
.setPublicPath('/build')
86+
.setOutputPath('public/build/second_build/')
87+
.setPublicPath('/build/second_build')
8888
.addEntry('mobile', './assets/js/mobile.js')
8989
.addStyleEntry('mobile', './assets/css/mobile.less')
9090
.enableLessLoader()
@@ -113,10 +113,10 @@ Next, define the output directories of each build:
113113
114114
# config/packages/webpack_encore.yaml
115115
webpack_encore:
116-
output_path: '%kernel.public_dir%/public/default_build'
116+
output_path: '%kernel.project_dir%/public/default_build'
117117
builds:
118-
firstConfig: '%kernel.public_dir%/public/first_build'
119-
secondConfig: '%kernel.public_dir%/public/second_build'
118+
firstConfig: '%kernel.project_dir%/public/first_build'
119+
secondConfig: '%kernel.project_dir%/public/second_build'
120120
121121
Finally, use the third optional parameter of the ``encore_entry_*_tags()``
122122
functions to specify which build to use:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.