Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix embed build with old web browsers

Chocobozzz39a88d24c7d3
diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js
index 3f28051920..120eedaded 100644
--- a/client/webpack/webpack.video-embed.js
+++ b/client/webpack/webpack.video-embed.js
@@ -68,6 +68,8 @@ module.exports = function () {
{
test: /\.ts$/,
use: [
+ getBabelLoader(),
+
{
loader: 'ts-loader',
options: {
@@ -78,20 +80,7 @@ module.exports = function () {
},
{
test: /\.m?js$/,
- use: [
- {
- loader: 'babel-loader',
- options: {
- presets: [
- [
- '@babel/preset-env', {
- targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11'
- }
- ]
- ]
- }
- }
- ]
+ use: [ getBabelLoader() ]
},
{
@@ -217,3 +206,18 @@ module.exports = function () {
return configuration
}
+
+function getBabelLoader () {
+ return {
+ loader: 'babel-loader',
+ options: {
+ presets: [
+ [
+ '@babel/preset-env', {
+ targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11'
+ }
+ ]
+ ]
+ }
+ }
+}