aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-06-04 10:05:17 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-06-04 10:05:17 +0200
commitc21f59d334b748be99188688c9578c9cd5432874 (patch)
tree9e8f29e63e92ed3a9bc4c077ace939211cea06ec /client
parentb20b5fed405f0ab24d24709d7db65625a79f3b37 (diff)
downloadPeerTube-c21f59d334b748be99188688c9578c9cd5432874.tar.gz
PeerTube-c21f59d334b748be99188688c9578c9cd5432874.tar.zst
PeerTube-c21f59d334b748be99188688c9578c9cd5432874.zip
Add webtorrent and jquery to webpack
Diffstat (limited to 'client')
-rw-r--r--client/.bootstraprc6
-rw-r--r--client/config/webpack.common.js9
-rw-r--r--client/config/webpack.prod.js1
-rw-r--r--client/src/vendor.ts4
4 files changed, 14 insertions, 6 deletions
diff --git a/client/.bootstraprc b/client/.bootstraprc
index a4d4fe689..76a0bdb7b 100644
--- a/client/.bootstraprc
+++ b/client/.bootstraprc
@@ -90,13 +90,13 @@ styles:
90 badges: false 90 badges: false
91 jumbotron: false 91 jumbotron: false
92 thumbnails: true 92 thumbnails: true
93 alerts: false 93 alerts: true
94 progress-bars: true 94 progress-bars: true
95 media: true 95 media: true
96 list-group: false 96 list-group: false
97 panels: false 97 panels: false
98 wells: false 98 wells: false
99 responsive-embed: false 99 responsive-embed: true
100 close: false 100 close: false
101 101
102 # Components w/ JavaScript 102 # Components w/ JavaScript
@@ -112,7 +112,7 @@ styles:
112### Bootstrap scripts 112### Bootstrap scripts
113scripts: 113scripts:
114 transition: false 114 transition: false
115 alert: false 115 alert: true
116 button: false 116 button: false
117 carousel: false 117 carousel: false
118 collapse: false 118 collapse: false
diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js
index abbf84fb0..a48518a35 100644
--- a/client/config/webpack.common.js
+++ b/client/config/webpack.common.js
@@ -68,7 +68,9 @@ module.exports = {
68 root: helpers.root('src'), 68 root: helpers.root('src'),
69 69
70 // remove other default values 70 // remove other default values
71 modulesDirectories: [ 'node_modules' ] 71 modulesDirectories: [ 'node_modules', 'node_modules/blueimp-file-upload/js/vendor' ],
72
73 packageAlias: 'browser'
72 74
73 }, 75 },
74 76
@@ -243,7 +245,8 @@ module.exports = {
243 new webpack.ProvidePlugin({ 245 new webpack.ProvidePlugin({
244 jQuery: 'jquery', 246 jQuery: 'jquery',
245 $: 'jquery', 247 $: 'jquery',
246 jquery: 'jquery' 248 jquery: 'jquery',
249 WebTorrent: 'webtorrent/webtorrent.min'
247 }) 250 })
248 251
249 ], 252 ],
@@ -257,6 +260,8 @@ module.exports = {
257 node: { 260 node: {
258 global: 'window', 261 global: 'window',
259 crypto: 'empty', 262 crypto: 'empty',
263 fs: 'empty',
264 events: true,
260 module: false, 265 module: false,
261 clearImmediate: false, 266 clearImmediate: false,
262 setImmediate: false 267 setImmediate: false
diff --git a/client/config/webpack.prod.js b/client/config/webpack.prod.js
index 23e2fabfe..8827888a3 100644
--- a/client/config/webpack.prod.js
+++ b/client/config/webpack.prod.js
@@ -9,7 +9,6 @@ const commonConfig = require('./webpack.common.js') // the settings that are com
9/** 9/**
10 * Webpack Plugins 10 * Webpack Plugins
11 */ 11 */
12const ProvidePlugin = require('webpack/lib/ProvidePlugin')
13const DefinePlugin = require('webpack/lib/DefinePlugin') 12const DefinePlugin = require('webpack/lib/DefinePlugin')
14const DedupePlugin = require('webpack/lib/optimize/DedupePlugin') 13const DedupePlugin = require('webpack/lib/optimize/DedupePlugin')
15const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin') 14const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin')
diff --git a/client/src/vendor.ts b/client/src/vendor.ts
index 7a8c8423e..dcc4439db 100644
--- a/client/src/vendor.ts
+++ b/client/src/vendor.ts
@@ -17,3 +17,7 @@ import 'rxjs/add/operator/mergeMap';
17 17
18import 'jquery'; 18import 'jquery';
19import 'bootstrap-loader'; 19import 'bootstrap-loader';
20import 'jquery.ui.widget/jquery.ui.widget';
21import 'blueimp-file-upload';
22// TODO: build webtorrent with webpack when https://github.com/webpack/webpack/pull/1931 will be merged
23import 'webtorrent/webtorrent.min';