]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/config/webpack.common.js
Fix client compilation
[github/Chocobozzz/PeerTube.git] / client / config / webpack.common.js
index 266e630f62d55bb92d51195666945e325e4eb5b7..61347dba2060e3ec80d7480a346cb0d335487e50 100644 (file)
@@ -135,7 +135,13 @@ module.exports = function (options) {
           test: /\.(sass|scss)$/,
           use: [
             'css-to-string-loader',
-            'css-loader?sourceMap',
+            {
+              loader: 'css-loader',
+              options: {
+                sourceMap: true,
+                importLoaders: 1
+              }
+            },
             'resolve-url-loader',
             {
               loader: 'sass-loader',
@@ -168,6 +174,13 @@ module.exports = function (options) {
             helpers.root('src/index.html'),
             helpers.root('src/standalone/videos/embed.html')
           ]
+        },
+
+        /* File loader for supporting images, for example, in CSS files.
+         */
+        {
+          test: /\.(jpg|png|gif)$/,
+          use: 'url-loader'
         }
 
       ]
@@ -249,14 +262,10 @@ module.exports = function (options) {
        */
       // Used by embed.html
       new CopyWebpackPlugin([
-        {
-          from: 'src/assets',
-          to: 'assets'
-        },
-        {
-          from: 'node_modules/webtorrent/webtorrent.min.js',
-          to: 'assets/webtorrent'
-        },
+        // {
+        //   from: 'src/assets',
+        //   to: 'assets'
+        // },
         {
           from: 'src/standalone',
           to: 'standalone'
@@ -271,7 +280,7 @@ module.exports = function (options) {
        * See: https://github.com/numical/script-ext-html-webpack-plugin
        */
       new ScriptExtHtmlWebpackPlugin({
-        sync: [ /polyfill|vendor/, 'webtorrent.min.js' ],
+        sync: [ /polyfill|vendor/ ],
         defaultAttribute: 'async',
         preload: [/polyfill|vendor|main/],
         prefetch: [/chunk/]