1
0
Fork 0

Add webtorrent and jquery to webpack

This commit is contained in:
Chocobozzz 2016-06-04 10:05:17 +02:00
parent b20b5fed40
commit c21f59d334
4 changed files with 14 additions and 6 deletions

View File

@ -90,13 +90,13 @@ styles:
badges: false badges: false
jumbotron: false jumbotron: false
thumbnails: true thumbnails: true
alerts: false alerts: true
progress-bars: true progress-bars: true
media: true media: true
list-group: false list-group: false
panels: false panels: false
wells: false wells: false
responsive-embed: false responsive-embed: true
close: false close: false
# Components w/ JavaScript # Components w/ JavaScript
@ -112,7 +112,7 @@ styles:
### Bootstrap scripts ### Bootstrap scripts
scripts: scripts:
transition: false transition: false
alert: false alert: true
button: false button: false
carousel: false carousel: false
collapse: false collapse: false

View File

@ -68,7 +68,9 @@ module.exports = {
root: helpers.root('src'), root: helpers.root('src'),
// remove other default values // 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({ new webpack.ProvidePlugin({
jQuery: 'jquery', jQuery: 'jquery',
$: 'jquery', $: 'jquery',
jquery: 'jquery' jquery: 'jquery',
WebTorrent: 'webtorrent/webtorrent.min'
}) })
], ],
@ -257,6 +260,8 @@ module.exports = {
node: { node: {
global: 'window', global: 'window',
crypto: 'empty', crypto: 'empty',
fs: 'empty',
events: true,
module: false, module: false,
clearImmediate: false, clearImmediate: false,
setImmediate: false setImmediate: false

View File

@ -9,7 +9,6 @@ const commonConfig = require('./webpack.common.js') // the settings that are com
/** /**
* Webpack Plugins * Webpack Plugins
*/ */
const ProvidePlugin = require('webpack/lib/ProvidePlugin')
const DefinePlugin = require('webpack/lib/DefinePlugin') const DefinePlugin = require('webpack/lib/DefinePlugin')
const DedupePlugin = require('webpack/lib/optimize/DedupePlugin') const DedupePlugin = require('webpack/lib/optimize/DedupePlugin')
const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin') const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin')

View File

@ -17,3 +17,7 @@ import 'rxjs/add/operator/mergeMap';
import 'jquery'; import 'jquery';
import 'bootstrap-loader'; 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';