blob: 8a4421ee482c263fe5d31e30a387e6bd68d14d4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const { merge } = require('webpack-merge')
const config = require('./webpack.common.js')
let isDev = false
try {
const buildMode = process.env.NODE_ENV
isDev = buildMode === 'development'
} catch (e) {
console.error('Could not determine build mode', e)
}
module.exports = merge(config, {
mode: isDev ? 'development' : 'production',
devtool: isDev ? 'cheap-source-map' : 'source-map',
})
|