mirror of
https://github.com/nextcloud/server.git
synced 2025-01-30 22:37:01 +00:00
5b9a8f0407
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
15 lines
394 B
JavaScript
15 lines
394 B
JavaScript
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',
|
|
})
|