summaryrefslogtreecommitdiff
path: root/web/source/index.js
diff options
context:
space:
mode:
authorLibravatar f0x52 <f0x@cthu.lu>2022-08-07 17:58:01 +0200
committerLibravatar GitHub <noreply@github.com>2022-08-07 17:58:01 +0200
commitf2a6ae3ef8dee5764bf99e051c4a2ff548b1d8ca (patch)
tree5c853ad758fe0d3702bf870d21392ebc87582813 /web/source/index.js
parent[frontend] style blockquote nicely within content (#742) (diff)
downloadgotosocial-f2a6ae3ef8dee5764bf99e051c4a2ff548b1d8ca.tar.xz
[feature] Photoswipe gallery (#740)
* implement photoswipe galleries * dependency wrangling * photoswipe-dynamic-caption plugin
Diffstat (limited to 'web/source/index.js')
-rw-r--r--web/source/index.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/web/source/index.js b/web/source/index.js
index 0e5df9f9b..17e4435c4 100644
--- a/web/source/index.js
+++ b/web/source/index.js
@@ -53,12 +53,23 @@ const postcssPlugins = [
const browserifyConfig = {
transform: [
- babelify.configure({
- presets: [
- require.resolve("@babel/preset-env"),
- require.resolve("@babel/preset-react")
- ]
- }),
+ [
+ babelify.configure({
+ presets: [
+ [
+ require.resolve("@babel/preset-env"),
+ {
+ modules: "cjs"
+ }
+ ],
+ require.resolve("@babel/preset-react")
+ ]
+ }),
+ {
+ global: true,
+ exclude: /node_modules\/(?!photoswipe-dynamic-caption-plugin)/,
+ }
+ ],
[require("uglifyify"), {
global: true,
exts: ".js"