diff options
author | Chocobozzz <me@florianbigard.com> | 2023-02-21 14:20:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-02-21 14:20:15 +0100 |
commit | 39a88d24c7d32e5e17f3741266226525fe6363d8 (patch) | |
tree | 5e6d076c6b82a2ba6e92c2a42f99fb390aef3030 /client | |
parent | 7bbc062dccb56007a6868d0d9cfabfa7bdadb163 (diff) | |
download | PeerTube-39a88d24c7d32e5e17f3741266226525fe6363d8.tar.gz PeerTube-39a88d24c7d32e5e17f3741266226525fe6363d8.tar.zst PeerTube-39a88d24c7d32e5e17f3741266226525fe6363d8.zip |
Fix embed build with old web browsers
Diffstat (limited to 'client')
-rw-r--r-- | client/webpack/webpack.video-embed.js | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index 3f2805192..120eedade 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js | |||
@@ -68,6 +68,8 @@ module.exports = function () { | |||
68 | { | 68 | { |
69 | test: /\.ts$/, | 69 | test: /\.ts$/, |
70 | use: [ | 70 | use: [ |
71 | getBabelLoader(), | ||
72 | |||
71 | { | 73 | { |
72 | loader: 'ts-loader', | 74 | loader: 'ts-loader', |
73 | options: { | 75 | options: { |
@@ -78,20 +80,7 @@ module.exports = function () { | |||
78 | }, | 80 | }, |
79 | { | 81 | { |
80 | test: /\.m?js$/, | 82 | test: /\.m?js$/, |
81 | use: [ | 83 | use: [ getBabelLoader() ] |
82 | { | ||
83 | loader: 'babel-loader', | ||
84 | options: { | ||
85 | presets: [ | ||
86 | [ | ||
87 | '@babel/preset-env', { | ||
88 | targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11' | ||
89 | } | ||
90 | ] | ||
91 | ] | ||
92 | } | ||
93 | } | ||
94 | ] | ||
95 | }, | 84 | }, |
96 | 85 | ||
97 | { | 86 | { |
@@ -217,3 +206,18 @@ module.exports = function () { | |||
217 | 206 | ||
218 | return configuration | 207 | return configuration |
219 | } | 208 | } |
209 | |||
210 | function getBabelLoader () { | ||
211 | return { | ||
212 | loader: 'babel-loader', | ||
213 | options: { | ||
214 | presets: [ | ||
215 | [ | ||
216 | '@babel/preset-env', { | ||
217 | targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11' | ||
218 | } | ||
219 | ] | ||
220 | ] | ||
221 | } | ||
222 | } | ||
223 | } | ||