summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-10-18 10:49:02 +0200
committerGitHub <noreply@github.com>2019-10-18 10:49:02 +0200
commit130535b316b850e15991013e58504c3950f1e6fe (patch)
tree39546df9a7a4d15bda6c34c6cfa8585aee9c3db8
parent41c92813c34b250d108db6931432f9dbdaa8be0d (diff)
parenta2b728972cdabaf68194ee78dc5aefbc1b75d537 (diff)
downloadnextcloud-server-130535b316b850e15991013e58504c3950f1e6fe.tar.gz
nextcloud-server-130535b316b850e15991013e58504c3950f1e6fe.zip
Merge pull request #17557 from nextcloud/build/webpack-single-modules
Allow building single webpack modules
-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: {