Update webpack config to remove explicit HMR plugin (#1729)
This change suppresses warning "<w> [webpack-dev-server] "hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration."
This commit is contained in:
		
							parent
							
								
									b205aaeee5
								
							
						
					
					
						commit
						5c83dd8790
					
				| 
						 | 
					@ -149,7 +149,6 @@ const config = {
 | 
				
			||||||
if (isDevMode) {
 | 
					if (isDevMode) {
 | 
				
			||||||
  // any dev only config
 | 
					  // any dev only config
 | 
				
			||||||
  config.plugins.push(
 | 
					  config.plugins.push(
 | 
				
			||||||
    new webpack.HotModuleReplacementPlugin(),
 | 
					 | 
				
			||||||
    new webpack.DefinePlugin({
 | 
					    new webpack.DefinePlugin({
 | 
				
			||||||
      __static: `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`,
 | 
					      __static: `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`,
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -147,7 +147,6 @@ const config = {
 | 
				
			||||||
if (isDevMode) {
 | 
					if (isDevMode) {
 | 
				
			||||||
  // any dev only config
 | 
					  // any dev only config
 | 
				
			||||||
  config.plugins.push(
 | 
					  config.plugins.push(
 | 
				
			||||||
    new webpack.HotModuleReplacementPlugin(),
 | 
					 | 
				
			||||||
    new webpack.DefinePlugin({
 | 
					    new webpack.DefinePlugin({
 | 
				
			||||||
      __static: `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`,
 | 
					      __static: `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`,
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,7 +62,6 @@ const config = {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
if (isDevMode) {
 | 
					if (isDevMode) {
 | 
				
			||||||
  // any dev only config
 | 
					  // any dev only config
 | 
				
			||||||
  config.plugins.push(new webpack.HotModuleReplacementPlugin())
 | 
					 | 
				
			||||||
} else {
 | 
					} else {
 | 
				
			||||||
  config.plugins.push(
 | 
					  config.plugins.push(
 | 
				
			||||||
    new webpack.LoaderOptionsPlugin({
 | 
					    new webpack.LoaderOptionsPlugin({
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue