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:
6363 // build the first configuration
6464 const firstConfig = Encore .getWebpackConfig ();
6565
66+ // Set a unique name for the config (needed later!)
67+ firstConfig .name = ' firstConfig' ;
68+
6669 // reset Encore to build the second config
6770 Encore .reset ();
6871
@@ -79,9 +82,19 @@ state of the current configuration to build a new one:
7982 // build the second configuration
8083 const secondConfig = Encore .getWebpackConfig ();
8184
85+ // Set a unique name for the config (needed later!)
86+ secondConfig .name = ' secondConfig' ;
87+
8288 // export the final configuration as an array of multiple configurations
8389 module .exports = [firstConfig, secondConfig];
8490
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+
8598 .. _`configuration options` : https://webpack.js.org/configuration/
8699.. _`Webpack's watchOptions` : https://webpack.js.org/configuration/watch/#watchoptions
87100.. _`array of configurations` : https://github.com/webpack/docs/wiki/configuration#multiple-configurations
You can’t perform that action at this time.
0 commit comments