From 3a31397ac29f71db5313ea0e819a1362a019b5cc Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Fri, 31 Jul 2020 09:40:53 +0200 Subject: Use `babel-loader-exclude-node-modules-except` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- webpack.common.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'webpack.common.js') 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)$/, -- cgit v1.2.3