Target "web" in serve mode only

This commit is contained in:
Dmitry Lyzo 2021-10-01 13:11:47 +03:00
parent a70c83de3c
commit 5d13add090

View File

@ -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',