]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/webpack/webpack.video-embed.js
Translated using Weblate (Persian)
[github/Chocobozzz/PeerTube.git] / client / webpack / webpack.video-embed.js
index c5df40a046437eaa79c83e23bf2f394033a685c5..e25677872e4f0842b7f43e845f964f18aae04a7a 100644 (file)
@@ -24,6 +24,8 @@ module.exports = function () {
 
       modules: [ helpers.root('src'), 'node_modules' ],
 
+      symlinks: true,
+
       alias: {
         'video.js$': path.resolve('node_modules/video.js/core.js'),
         'hls.js$': path.resolve('node_modules/hls.js/dist/hls.light.js'),
@@ -66,30 +68,19 @@ module.exports = function () {
         {
           test: /\.ts$/,
           use: [
+            getBabelLoader(),
+
             {
               loader: 'ts-loader',
               options: {
-                configFile: helpers.root('tsconfig.json')
+                configFile: helpers.root('src/standalone/videos/tsconfig.json')
               }
             }
           ]
         },
         {
-          test: /\.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'
-                    }
-                  ]
-                ]
-              }
-            }
-          ]
+          test: /\.m?js$/,
+          use: [ getBabelLoader() ]
         },
 
         {
@@ -188,6 +179,7 @@ module.exports = function () {
             ecma: 6,
             warnings: false,
             ie8: false,
+            safari10: false,
             mangle: true,
             compress: {
               passes: 3,
@@ -214,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 >= 12, ios_saf >= 12'
+          }
+        ]
+      ]
+    }
+  }
+}