]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/webpack/webpack.video-embed.js
deal with refresh token in embed
[github/Chocobozzz/PeerTube.git] / client / webpack / webpack.video-embed.js
index f6d532556c70b6a86b6fc557576ca65b203343f6..b6a1c4c050f918f4d8db03f57445c1e1ac821ea1 100644 (file)
@@ -27,15 +27,21 @@ module.exports = function () {
       modules: [ helpers.root('src'), helpers.root('node_modules') ],
 
       alias: {
-        'video.js$': path.resolve('node_modules/video.js/dist/alt/video.core.novtt.js')
+        'video.js$': path.resolve('node_modules/video.js/core.js'),
+        '@root-helpers': path.resolve('src/root-helpers'),
+        '@shared': path.resolve('../shared')
       }
     },
 
     output: {
       path: helpers.root('dist/standalone/videos'),
-      filename: '[name].[hash].bundle.js',
+
+      filename: process.env.ANALYZE_BUNDLE === 'true'
+        ? '[name].bundle.js'
+        : '[name].[hash].bundle.js',
+
       sourceMapFilename: '[file].map',
-      chunkFilename: '[id].chunk.js',
+      chunkFilename: '[id].[hash].chunk.js',
       publicPath: '/client/standalone/videos/'
     },
 
@@ -78,10 +84,12 @@ module.exports = function () {
               {
                 loader: 'sass-loader',
                 options: {
-                  sourceMap: true,
-                  includePaths: [
-                    helpers.root('src/sass/include')
-                  ]
+                  sassOptions: {
+                    sourceMap: true,
+                    includePaths: [
+                      helpers.root('src/sass/include')
+                    ]
+                  }
                 }
               }
             ]
@@ -111,7 +119,9 @@ module.exports = function () {
 
     plugins: [
       new ExtractTextPlugin({
-        filename: '[name].[hash].css'
+        filename: process.env.ANALYZE_BUNDLE === 'true'
+          ? '[name].css'
+          : '[name].[hash].css'
       }),
 
       new PurifyCSSPlugin({
@@ -131,7 +141,7 @@ module.exports = function () {
         template: 'src/standalone/videos/embed.html',
         filename: 'embed.html',
         title: 'PeerTube',
-        chunksSortMode: 'dependency',
+        chunksSortMode: 'auto',
         inject: 'body',
         chunks: ['video-embed']
       }),
@@ -140,7 +150,7 @@ module.exports = function () {
         template: '!!html-loader!src/standalone/videos/test-embed.html',
         filename: 'test-embed.html',
         title: 'PeerTube',
-        chunksSortMode: 'dependency',
+        chunksSortMode: 'auto',
         inject: 'body',
         chunks: ['test-embed']
       }),