aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-12-28 15:29:54 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-01-04 16:46:14 +0100
commit5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5 (patch)
tree1363678dab6ed5e1554a7a74bc8a6a1a55bdf785 /webpack.config.js
parent8f1bf13ae3046400ce6248fb13e5515e8e9ed5c4 (diff)
downloadnextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.tar.gz
nextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.zip
Add component testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 00000000000..8a4421ee482
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,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',
+})