From 5d13add090f5eddcf344334b6e91bc73be7d6e14 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Fri, 1 Oct 2021 13:11:47 +0300 Subject: [PATCH] Target "web" in serve mode only --- webpack.dev.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.dev.js b/webpack.dev.js index 890dd0eac6..024a3729d5 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -3,7 +3,7 @@ const { merge } = require('webpack-merge'); module.exports = merge(common, { // In order for live reload to work we must use "web" as the target not "browserlist" - target: 'web', + target: process.env.WEBPACK_SERVE ? 'web' : 'browserslist', mode: 'development', entry: './scripts/site.js', devtool: 'source-map',