diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-08-26 11:42:31 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-08-26 13:17:22 +0200 |
commit | 9a6fe909412ef5604086df6279d2c59b2e7d4704 (patch) | |
tree | b1c916c13624c7e0f2caf815a65d693c3f052c86 /webpack.js | |
parent | d88116dc27ce8a0d64523fb7597cb38db363f9b1 (diff) |
Bump webdav to ^4
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.js')
-rw-r--r-- | webpack.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -7,6 +7,7 @@ const SassGridConfig = require('./src/utils/SassGridConfig') const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except') const WorkboxPlugin = require('workbox-webpack-plugin') +const { basename } = require('path') webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([ '@essentials/request-timeout', @@ -41,9 +42,10 @@ webpackConfig.module.rules = Object.values(webpackRules) webpackConfig.plugins.push( // patch webdav/dist/request.js new webpack.NormalModuleReplacementPlugin( - /request.js/, + /request(\.js)?/, function(resource) { - if (resource.context.indexOf('webdav/dist') > -1) { + if (resource.context.indexOf('webdav') > -1) { + console.debug('Patched request for webdav', basename(resource.contextInfo.issuer)) resource.request = path.join(__dirname, 'src/patchedRequest.js') } }, |