0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-24 08:56:48 +00:00
nextcloud_server/webpack.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
522 B
JavaScript
Raw Normal View History

/**
* 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',
})