diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-07-31 09:40:53 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-07-31 11:00:33 +0200 |
commit | 3a31397ac29f71db5313ea0e819a1362a019b5cc (patch) | |
tree | c14a1b88ccf1c4a7c57b752314ceec9c0e38b183 /webpack.common.js | |
parent | a384b4a97a2a4444d8e2c831765dbf35c8da0db2 (diff) | |
download | nextcloud-server-3a31397ac29f71db5313ea0e819a1362a019b5cc.tar.gz nextcloud-server-3a31397ac29f71db5313ea0e819a1362a019b5cc.zip |
Use `babel-loader-exclude-node-modules-except`
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/webpack.common.js b/webpack.common.js index b7aeb7193d6..e9adf418107 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -1,7 +1,8 @@ /* eslint-disable camelcase */ -const path = require('path') const { merge } = require('webpack-merge') const { VueLoaderPlugin } = require('vue-loader') +const babelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except') +const path = require('path') const accessibility = require('./apps/accessibility/webpack') const comments = require('./apps/comments/webpack') @@ -85,7 +86,20 @@ module.exports = [] loader: 'babel-loader', // automatically detect necessary packages to // transpile in the node_modules folder - exclude: /node_modules(?!(\/|\\)(nextcloud-vue-collections|p-finally|p-limit|p-locate|p-queue|p-timeout|p-try|toastify-js|v-tooltip)(\/|\\))/, + exclude: babelLoaderExcludeNodeModulesExcept([ + 'nextcloud-vue-collections', + 'p-finally', + 'p-limit', + 'p-locate', + 'p-queue', + 'p-timeout', + 'p-try', + 'toastify-js', + 'v-tooltip', + '@nextcloud/dialogs', + 'davclient.js', + 'semver', + ]), }, { test: /\.(png|jpg|gif)$/, |