]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/config/webpack.common.js
Merge branch 'postgresql'
[github/Chocobozzz/PeerTube.git] / client / config / webpack.common.js
index 5ef5621e64c18da962ba8e4f7152ea8b0416791a..7631af6b9f449167375f54f4350cc2bb08d7f927 100644 (file)
@@ -67,7 +67,11 @@ module.exports = function (options) {
        */
       extensions: [ '.ts', '.js', '.json', '.scss' ],
 
-      modules: [helpers.root('src'), 'node_modules']
+      modules: [helpers.root('src'), 'node_modules'],
+
+      alias: {
+        'video.js': 'video.js/dist/alt/video.novtt'
+      }
     },
 
     /*
@@ -119,7 +123,7 @@ module.exports = function (options) {
         {
           test: /\.html$/,
           loader: 'raw-loader',
-          exclude: [ helpers.root('src/index.html') ]
+          exclude: [ helpers.root('src/index.html'), helpers.root('src/standalone/videos/embed.html') ]
         }
 
       ]
@@ -179,6 +183,7 @@ module.exports = function (options) {
        *
        * See: https://www.npmjs.com/package/copy-webpack-plugin
        */
+      // Used by embed.html
       new CopyWebpackPlugin([
         {
           from: 'src/assets',
@@ -187,6 +192,26 @@ module.exports = function (options) {
         {
           from: 'node_modules/webtorrent/webtorrent.min.js',
           to: 'assets/webtorrent'
+        },
+        {
+          from: 'node_modules/video.js/dist/video.min.js',
+          to: 'assets/video-js'
+        },
+        {
+          from: 'node_modules/video.js/dist/video-js.min.css',
+          to: 'assets/video-js'
+        },
+        {
+          from: 'node_modules/videojs-dock/dist/videojs-dock.min.js',
+          to: 'assets/video-js'
+        },
+        {
+          from: 'node_modules/videojs-dock/dist/videojs-dock.css',
+          to: 'assets/video-js'
+        },
+        {
+          from: 'src/standalone',
+          to: 'standalone'
         }
       ]),
 
@@ -213,6 +238,7 @@ module.exports = function (options) {
       * See: https://github.com/numical/script-ext-html-webpack-plugin
       */
       new ScriptExtHtmlWebpackPlugin({
+        sync: [ 'webtorrent.min.js' ],
         defaultAttribute: 'defer'
       }),