aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.common.js
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-10-16 09:05:16 +0200
committerJulius Härtl <jus@bitgrid.net>2019-10-16 09:05:16 +0200
commita2b728972cdabaf68194ee78dc5aefbc1b75d537 (patch)
tree218b981fa0c9c994ab52bca19ae57110cfda2779 /webpack.common.js
parent8153bd00a56add11c3032c0af4c7ace8ed0ce4a4 (diff)
downloadnextcloud-server-a2b728972cdabaf68194ee78dc5aefbc1b75d537.tar.gz
nextcloud-server-a2b728972cdabaf68194ee78dc5aefbc1b75d537.zip
Allow building single webpack modules
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js39
1 files changed, 27 insertions, 12 deletions
diff --git a/webpack.common.js b/webpack.common.js
index c337ebf3766..32645146066 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -17,20 +17,35 @@ const twofactor_backupscodes = require('./apps/twofactor_backupcodes/webpack')
const updatenotifications = require('./apps/updatenotification/webpack')
const workflowengine = require('./apps/workflowengine/webpack')
+const modules = {
+ core,
+ settings,
+ accessibility,
+ comments,
+ files_sharing,
+ files_trashbin,
+ files_versions,
+ oauth2,
+ systemtags,
+ twofactor_backupscodes,
+ updatenotifications,
+ workflowengine
+}
+
+const modulesToBuild = () => {
+ const MODULE = process.env.MODULE
+ if (MODULE) {
+ if (!modules[MODULE]) {
+ throw new Error(`No module "${MODULE}" found`)
+ }
+ return [ modules[MODULE] ]
+ }
+ return Object.values(modules)
+}
+
module.exports = []
.concat(
- core,
- settings,
- accessibility,
- comments,
- files_sharing,
- files_trashbin,
- files_versions,
- oauth2,
- systemtags,
- twofactor_backupscodes,
- updatenotifications,
- workflowengine
+ ...modulesToBuild()
)
.map(config => merge.smart({
module: {