From c21f59d334b748be99188688c9578c9cd5432874 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 4 Jun 2016 10:05:17 +0200 Subject: Add webtorrent and jquery to webpack --- client/config/webpack.common.js | 9 +++++++-- client/config/webpack.prod.js | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'client/config') 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 = { 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 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 /** * 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') -- cgit v1.2.3