blob: caa6b9f0882dc013eac61cf5a8bfd7bcaf1b48b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
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',
})
|