File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ state of the current configuration to build a new one:
63
63
// build the first configuration
64
64
const firstConfig = Encore .getWebpackConfig ();
65
65
66
+ // Set a unique name for the config (needed later!)
67
+ firstConfig .name = ' firstConfig' ;
68
+
66
69
// reset Encore to build the second config
67
70
Encore .reset ();
68
71
@@ -79,9 +82,19 @@ state of the current configuration to build a new one:
79
82
// build the second configuration
80
83
const secondConfig = Encore .getWebpackConfig ();
81
84
85
+ // Set a unique name for the config (needed later!)
86
+ secondConfig .name = ' secondConfig' ;
87
+
82
88
// export the final configuration as an array of multiple configurations
83
89
module .exports = [firstConfig, secondConfig];
84
90
91
+ When running Encore, both configurations will be built in parallel. If you
92
+ prefer to build configs separately, pass the ``--config-name `` option:
93
+
94
+ .. code-block :: terminal
95
+
96
+ $ yarn run encore dev --config-name firstConfig
97
+
85
98
.. _`configuration options` : https://webpack.js.org/configuration/
86
99
.. _`Webpack's watchOptions` : https://webpack.js.org/configuration/watch/#watchoptions
87
100
.. _`array of configurations` : https://github.com/webpack/docs/wiki/configuration#multiple-configurations
You can’t perform that action at this time.
0 commit comments