We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 673daf8 commit b46efe6Copy full SHA for b46efe6
lib/groups/advanced.js
@@ -43,8 +43,13 @@ class AdvancedGroup extends GroupHelper {
43
resolveOptions() {
44
const { args } = this;
45
if (args.hot) {
46
- const HotModuleReplacementPlugin = require('webpack').HotModuleReplacementPlugin;
47
- this.opts.options.plugins = [new HotModuleReplacementPlugin()];
+ const { HotModuleReplacementPlugin } = require('webpack');
+ const hotModuleVal = new HotModuleReplacementPlugin();
48
+ if (this.opts.options && this.opts.options.plugins) {
49
+ this.opts.options.plugins.unshift(hotModuleVal);
50
+ } else {
51
+ this.opts.options.plugins = [hotModuleVal];
52
+ }
53
}
54
if (args.prefetch) {
55
const { PrefetchPlugin } = require('webpack');
0 commit comments