Skip to content

Commit 81f9491

Browse files
gseideljaviereguiluz
authored andcommitted
fix encore multiple configuration build paths
1 parent e2c3021 commit 81f9491

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

frontend/encore/advanced-config.rst

Lines 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('web/build/')
67-
.setPublicPath('/build')
66+
.setOutputPath('web/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('web/build/')
87-
.setPublicPath('/build')
86+
.setOutputPath('web/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
# app/config/config.yml
115115
webpack_encore:
116-
output_path: '%kernel.public_dir%/web/default_build'
116+
output_path: '%kernel.project_dir%/web/default_build'
117117
builds:
118-
firstConfig: '%kernel.public_dir%/web/first_build'
119-
secondConfig: '%kernel.public_dir%/web/second_build'
118+
firstConfig: '%kernel.project_dir%/web/first_build'
119+
secondConfig: '%kernel.project_dir%/web/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)