|
@@ -1,28 +1,26 @@
|
1
|
1
|
/* global __dirname */
|
2
|
2
|
|
3
|
|
-require('babel-polyfill'); // Define Object.assign() from ES6 in ES5.
|
|
3
|
+const HasteResolverPlugin = require('haste-resolver-webpack-plugin');
|
|
4
|
+const process = require('process');
|
|
5
|
+const webpack = require('webpack');
|
4
|
6
|
|
5
|
|
-var HasteResolverPlugin = require('haste-resolver-webpack-plugin');
|
6
|
|
-var process = require('process');
|
7
|
|
-var webpack = require('webpack');
|
8
|
|
-
|
9
|
|
-var aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
|
|
7
|
+const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
|
10
|
8
|
|
11
|
9
|
/**
|
12
|
10
|
* The URL of the Jitsi Meet deployment to be proxy to in the context of
|
13
|
11
|
* development with webpack-dev-server.
|
14
|
12
|
*/
|
15
|
|
-var devServerProxyTarget
|
|
13
|
+const devServerProxyTarget
|
16
|
14
|
= process.env.WEBPACK_DEV_SERVER_PROXY_TARGET || 'https://beta.meet.jit.si';
|
17
|
15
|
|
18
|
|
-var minimize
|
|
16
|
+const minimize
|
19
|
17
|
= process.argv.indexOf('-p') !== -1
|
20
|
18
|
|| process.argv.indexOf('--optimize-minimize') !== -1;
|
21
|
|
-var node_modules = __dirname + '/node_modules/';
|
22
|
|
-var plugins = [
|
|
19
|
+const node_modules = __dirname + '/node_modules/';
|
|
20
|
+const plugins = [
|
23
|
21
|
new HasteResolverPlugin()
|
24
|
22
|
];
|
25
|
|
-var strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
|
|
23
|
+const strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
|
26
|
24
|
|
27
|
25
|
if (minimize) {
|
28
|
26
|
// XXX Webpack's command line argument -p is not enough. Further
|
|
@@ -54,7 +52,7 @@ if (minimize) {
|
54
|
52
|
|
55
|
53
|
// The base Webpack configuration to bundle the JavaScript artifacts of
|
56
|
54
|
// jitsi-meet such as app.bundle.js and external_api.js.
|
57
|
|
-var config = {
|
|
55
|
+const config = {
|
58
|
56
|
devServer: {
|
59
|
57
|
https: true,
|
60
|
58
|
inline: true,
|
|
@@ -160,7 +158,7 @@ var config = {
|
160
|
158
|
}
|
161
|
159
|
};
|
162
|
160
|
|
163
|
|
-var configs = [
|
|
161
|
+const configs = [
|
164
|
162
|
|
165
|
163
|
// The Webpack configuration to bundle app.bundle.js (aka APP).
|
166
|
164
|
Object.assign({}, config, {
|
|
@@ -196,7 +194,7 @@ module.exports = configs;
|
196
|
194
|
* target, undefined; otherwise, the path to the local file to be served.
|
197
|
195
|
*/
|
198
|
196
|
function devServerProxyBypass(request) {
|
199
|
|
- var path = request.path;
|
|
197
|
+ let path = request.path;
|
200
|
198
|
|
201
|
199
|
// Use local files from the css and libs directories.
|
202
|
200
|
if (path.startsWith('/css/')) {
|