summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Warren <earl-warren@noreply.codeberg.org>2024-07-25 07:55:45 +0200
committerEarl Warren <earl-warren@noreply.codeberg.org>2024-07-25 07:55:45 +0200
commit7dfc938e82f84301b4e12323905577c2b0b2542f (patch)
treea47e5de4d3eb7a73b4b3c572b070d461cfa235c2
parentMerge pull request '[v7.0/forgejo] Replace Gitea with Forgejo' (#4674) from b... (diff)
parent[CHORE] Don't bundle `elkjs` (diff)
downloadforgejo-7dfc938e82f84301b4e12323905577c2b0b2542f.tar.xz
forgejo-7dfc938e82f84301b4e12323905577c2b0b2542f.zip
Merge pull request '[v7.0/forgejo] [CHORE] Don't bundle `elkjs`' (#4679) from bp-v7.0/forgejo-510cbe2 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4679 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
-rw-r--r--webpack.config.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
index b6ecb29421..bc9b6ea9a5 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -73,6 +73,14 @@ const filterCssImport = (url, ...args) => {
/** @type {import("webpack").Configuration} */
export default {
+ externals: [
+ function ({request}, callback) {
+ if (/elkjs/.test(request)) {
+ return callback(null, `commonjs ${request}`);
+ }
+ callback();
+ },
+ ],
mode: isProduction ? 'production' : 'development',
entry: {
index: [