]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add webtorrent and jquery to webpack
authorChocobozzz <florian.bigard@gmail.com>
Sat, 4 Jun 2016 08:05:17 +0000 (10:05 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Sat, 4 Jun 2016 08:05:17 +0000 (10:05 +0200)
client/.bootstraprc
client/config/webpack.common.js
client/config/webpack.prod.js
client/src/vendor.ts

index a4d4fe689fb6400021b1e77e9b6c529cf7289c06..76a0bdb7b15d59ce90cf0df180b811d99d317388 100644 (file)
@@ -90,13 +90,13 @@ styles:
   badges: false
   jumbotron: false
   thumbnails: true
-  alerts: false
+  alerts: true
   progress-bars: true
   media: true
   list-group: false
   panels: false
   wells: false
-  responsive-embed: false
+  responsive-embed: true
   close: false
 
   # Components w/ JavaScript
@@ -112,7 +112,7 @@ styles:
 ### Bootstrap scripts
 scripts:
   transition: false
-  alert: false
+  alert: true
   button: false
   carousel: false
   collapse: false
index abbf84fb09ea3c2f1f5a8c30c65dfdf874081106..a48518a351025465e53cbe237b99f3ec4d160ce3 100644 (file)
@@ -68,7 +68,9 @@ module.exports = {
     root: helpers.root('src'),
 
     // remove other default values
-    modulesDirectories: [ 'node_modules' ]
+    modulesDirectories: [ 'node_modules', 'node_modules/blueimp-file-upload/js/vendor' ],
+
+    packageAlias: 'browser'
 
   },
 
@@ -243,7 +245,8 @@ module.exports = {
     new webpack.ProvidePlugin({
       jQuery: 'jquery',
       $: 'jquery',
-      jquery: 'jquery'
+      jquery: 'jquery',
+      WebTorrent: 'webtorrent/webtorrent.min'
     })
 
   ],
@@ -257,6 +260,8 @@ module.exports = {
   node: {
     global: 'window',
     crypto: 'empty',
+    fs: 'empty',
+    events: true,
     module: false,
     clearImmediate: false,
     setImmediate: false
index 23e2fabfe127b4ec9e36f368388adb3328cb3847..8827888a3b986464904ee660b4231df0d4e62598 100644 (file)
@@ -9,7 +9,6 @@ const commonConfig = require('./webpack.common.js') // the settings that are com
 /**
  * Webpack Plugins
  */
-const ProvidePlugin = require('webpack/lib/ProvidePlugin')
 const DefinePlugin = require('webpack/lib/DefinePlugin')
 const DedupePlugin = require('webpack/lib/optimize/DedupePlugin')
 const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin')
index 7a8c8423e0f13729a759cc703f645d8f6a7ed3b6..dcc4439db03461c7f246ed58c9254a8907534e6b 100644 (file)
@@ -17,3 +17,7 @@ import 'rxjs/add/operator/mergeMap';
 
 import 'jquery';
 import 'bootstrap-loader';
+import 'jquery.ui.widget/jquery.ui.widget';
+import 'blueimp-file-upload';
+// TODO: build webtorrent with webpack when https://github.com/webpack/webpack/pull/1931 will be merged
+import 'webtorrent/webtorrent.min';