diff options
author | Louis Chemineau <louis@chmn.me> | 2022-09-21 16:50:28 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-10-10 12:23:52 +0200 |
commit | ff01726c6b1a735aace5e88da8387b2e11e4b6f8 (patch) | |
tree | 7d62311c54127e2676b1d8cb65f9ae79830ed606 /webpack.js | |
parent | d8ab1a24d1a4268189ce0e0dfd3f48d84973acf5 (diff) |
Add public link logic
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'webpack.js')
-rw-r--r-- | webpack.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -9,6 +9,11 @@ const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-m const WorkboxPlugin = require('workbox-webpack-plugin') const { basename } = require('path') +webpackConfig.entry = { + main: path.join(__dirname, 'src', 'main.js'), + public: path.join(__dirname, 'src', 'public.js'), +} + webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([ '@essentials/request-timeout', '@nextcloud/event-bus', @@ -43,7 +48,7 @@ webpackConfig.plugins.push( // patch webdav/dist/request.js new webpack.NormalModuleReplacementPlugin( /request(\.js)?/, - function(resource) { + function (resource) { if (resource.context.indexOf('webdav') > -1) { console.debug('Patched request for webdav', basename(resource.contextInfo.issuer)) resource.request = path.join(__dirname, 'src/patchedRequest.js') |