From 2ed8c6044db6ef995042c069c662201ace25d243 Mon Sep 17 00:00:00 2001 From: Samet Tarim <16712059+prod3v3loper@users.noreply.github.com> Date: Thu, 31 Jan 2019 21:03:41 +0100 Subject: [PATCH] Correction of the webpack-merge configuration After several attempts and my question on stackoverflow https://stackoverflow.com/questions/54350271/webpack-scaffold-webpackoptions-merge-not-work-why I found the problem in the file https://github.com/webpack /webpack-cli/blob/eb06af8c2994cd1fea8d2c687de16bbf2f10095a/packages/utils/modify-config-helper.ts merge will not be passed to the webpackOptions but stand alone, like topScope for example. --- SCAFFOLDING.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SCAFFOLDING.md b/SCAFFOLDING.md index 5758dcc02b9..e2ac69782ba 100644 --- a/SCAFFOLDING.md +++ b/SCAFFOLDING.md @@ -60,11 +60,17 @@ As with a regular webpack configuration, this property behaves the same. Inside ```js this.options.env.configuration.dev.webpackOptions = { entry: '\'app.js\'', -output: {....}, -merge: 'myConfig' +output: {....} }; ``` -If you want to use `webpack-merge`, you can supply `webpackOptions` with the merge property, and the configuration you want to merge it with. + +### `myObj.merge` (optional) + +If you want to use `webpack-merge`, you can supply `merge` with the merge property, and the configuration you want to merge it with. + +```js +this.options.env.configuration.dev.merge = 'myConfig'; +``` ### `myObj.topScope`(optional)