]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/webpack/webpack.video-embed.js
Fix stuck hls player with bad redundancy
[github/Chocobozzz/PeerTube.git] / client / webpack / webpack.video-embed.js
index 8320d01e71d5d3bd49cecced17809da12784228e..13bcf9717316acd1d43daeb04848f28ae4146504 100644 (file)
@@ -3,7 +3,6 @@ const path = require('path')
 
 const HtmlWebpackPlugin = require('html-webpack-plugin')
 const TerserPlugin = require('terser-webpack-plugin')
-const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin')
 const ProvidePlugin = require('webpack/lib/ProvidePlugin')
 const MiniCssExtractPlugin = require('mini-css-extract-plugin')
 
@@ -70,7 +69,24 @@ module.exports = function () {
             {
               loader: 'ts-loader',
               options: {
-                configFile: 'tsconfig.json'
+                configFile: helpers.root('tsconfig.json')
+              }
+            }
+          ]
+        },
+        {
+          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'
+                    }
+                  ]
+                ]
               }
             }
           ]
@@ -162,20 +178,6 @@ module.exports = function () {
         chunksSortMode: 'auto',
         inject: 'body',
         chunks: [ 'test-embed' ]
-      }),
-
-      /**
-       * Plugin LoaderOptionsPlugin (experimental)
-       *
-       * See: https://gist.github.com/sokra/27b24881210b56bbaff7
-       */
-      new LoaderOptionsPlugin({
-        options: {
-          context: __dirname,
-          output: {
-            path: helpers.root('dist')
-          }
-        }
       })
     ],