Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Ambrosini <marcoambrosini@pm.me>2021-06-14 18:03:25 +0300
committerJoas Schilling <coding@schilljs.com>2021-06-17 17:48:26 +0300
commit29b2dd55ac8d7d593d0a1fb0b4bf09e01137ee42 (patch)
tree884ab667aa538857f5b01371a4dbf10340ce969f /webpack.js
parent6b452be45b4906c025f7f54d4a1a2ab8af5ff0e5 (diff)
Bump dependencies and use npm7
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Diffstat (limited to 'webpack.js')
-rw-r--r--webpack.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/webpack.js b/webpack.js
new file mode 100644
index 000000000..d58e48a1f
--- /dev/null
+++ b/webpack.js
@@ -0,0 +1,52 @@
+const path = require('path')
+const webpackConfig = require('@nextcloud/webpack-vue-config')
+const webpackRules = require('@nextcloud/webpack-vue-config/rules')
+const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
+
+webpackConfig.entry = {
+ 'admin-settings': path.join(__dirname, 'src', 'mainAdminSettings.js'),
+ 'collections': path.join(__dirname, 'src', 'collections.js'),
+ 'main': path.join(__dirname, 'src', 'main.js'),
+ 'files-sidebar': [
+ path.join(__dirname, 'src', 'mainFilesSidebar.js'),
+ path.join(__dirname, 'src', 'mainFilesSidebarLoader.js'),
+ ],
+ 'public-share-auth-sidebar': path.join(__dirname, 'src', 'mainPublicShareAuthSidebar.js'),
+ 'public-share-sidebar': path.join(__dirname, 'src', 'mainPublicShareSidebar.js'),
+ 'flow': path.join(__dirname, 'src', 'flow.js'),
+ 'dashboard': path.join(__dirname, 'src', 'dashboard.js'),
+ 'deck': path.join(__dirname, 'src', 'deck.js'),
+}
+
+// Edit JS rule
+webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([
+ '@juliushaertl/vue-richtext',
+ '@nextcloud/event-bus',
+ '@nextcloud/vue-dashboard',
+ 'ansi-regex',
+ 'color.js',
+ 'fast-xml-parser',
+ 'hot-patcher',
+ 'nextcloud-vue-collections',
+ 'semver',
+ 'strip-ansi',
+ 'tributejs',
+ 'vue-resize',
+ 'webdav',
+])
+
+// Replaces rules array
+webpackConfig.module.rules = Object.values(webpackRules)
+
+webpackConfig.module.rules.push({
+ /**
+ * webrtc-adapter main module does no longer provide
+ * "module.exports", which is expected by some elements using it
+ * (like "attachmediastream"), so it needs to be added back with
+ * a plugin.
+ */
+ test: /node_modules\/webrtc-adapter\/.*\.js$/,
+ loader: 'babel-loader',
+})
+
+module.exports = webpackConfig