diff options
author | Joas Schilling <coding@schilljs.com> | 2020-07-29 17:35:09 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-07-29 17:35:09 +0300 |
commit | 4e3bab979626e7ea593c75bf33bb860f1e8bcd26 (patch) | |
tree | 491da4fe1773ad017b5ac4e214c3003b0ebf6c5e /webpack.common.js | |
parent | 9fede6d19543802c0f1dc60e3bcef74057e00937 (diff) |
Use `babel-loader-exclude-node-modules-except`
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/webpack.common.js b/webpack.common.js index 6b0fd495c..91cdf7f9f 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -1,6 +1,7 @@ const path = require('path') const { VueLoaderPlugin } = require('vue-loader') const StyleLintPlugin = require('stylelint-webpack-plugin') +const babelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except') module.exports = { entry: { @@ -37,12 +38,20 @@ module.exports = { { test: /\.vue$/, loader: 'vue-loader', - exclude: /node_modules(?!(\/|\\)(vue-material-design-icons)(\/|\\))/, + exclude: babelLoaderExcludeNodeModulesExcept([ + 'vue-material-design-icons', + ]), }, { test: /\.js$/, loader: 'babel-loader', - exclude: /node_modules(?!(\/|\\)(@juliushaertl\/vue-richtext|fast-xml-parser|hot-patcher|nextcloud-vue-collections|webdav)(\/|\\))/, + exclude: babelLoaderExcludeNodeModulesExcept([ + '@juliushaertl/vue-richtext', + 'fast-xml-parser', + 'hot-patcher', + 'nextcloud-vue-collections', + 'webdav', + ]), }, { /** |