From 37c7e0dd93093d415d9050cbae01018d7f7c89c3 Mon Sep 17 00:00:00 2001 From: Nathan Knowler Date: Fri, 19 Oct 2018 09:49:31 -0600 Subject: [PATCH] Add note regarding webpack.config.preset.js usage See #2119 --- resources/assets/build/webpack.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/assets/build/webpack.config.js b/resources/assets/build/webpack.config.js index 9253c2d..2d14a27 100644 --- a/resources/assets/build/webpack.config.js +++ b/resources/assets/build/webpack.config.js @@ -214,6 +214,15 @@ if (config.enabled.watcher) { webpackConfig = merge(webpackConfig, require('./webpack.config.watch')); } +/** + * During installation via sage-installer (i.e. composer create-project) some + * presets may generate a preset specific config (webpack.config.preset.js) to + * override some of the default options set here. We use webpack-merge to merge + * them in. If you need to modify Sage's default webpack config, we recommend + * that you modify this file directly, instead of creating your own preset + * file, as there are limitations to using webpack-merge which can hinder your + * ability to change certain options. + */ module.exports = merge.smartStrategy({ 'module.loaders': 'replace', })(webpackConfig, desire(`${__dirname}/webpack.config.preset`));