|
@@ -1,16 +1,18 @@
|
1
|
1
|
/* global __dirname */
|
2
|
2
|
|
3
|
|
-import process from 'process';
|
|
3
|
+require('babel-polyfill'); // Define Object.assign() from ES6 in ES5.
|
4
|
4
|
|
5
|
|
-const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
|
6
|
|
-const minimize
|
|
5
|
+var process = require('process');
|
|
6
|
+
|
|
7
|
+var aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
|
|
8
|
+var minimize
|
7
|
9
|
= process.argv.indexOf('-p') != -1
|
8
|
10
|
|| process.argv.indexOf('--optimize-minimize') != -1;
|
9
|
|
-const strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
|
|
11
|
+var strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
|
10
|
12
|
|
11
|
13
|
// The base Webpack configuration to bundle the JavaScript artifacts of
|
12
|
14
|
// jitsi-meet such as app.bundle.js and external_api.js.
|
13
|
|
-const config = {
|
|
15
|
+var config = {
|
14
|
16
|
devtool: 'source-map',
|
15
|
17
|
module: {
|
16
|
18
|
loaders: [{
|
|
@@ -18,6 +20,11 @@ const config = {
|
18
|
20
|
|
19
|
21
|
exclude: __dirname + '/node_modules/',
|
20
|
22
|
loader: 'babel',
|
|
23
|
+ query: {
|
|
24
|
+ presets: [
|
|
25
|
+ 'es2015'
|
|
26
|
+ ]
|
|
27
|
+ },
|
21
|
28
|
test: /\.js$/
|
22
|
29
|
},{
|
23
|
30
|
// Expose jquery as the globals $ and jQuery because it is expected
|
|
@@ -91,27 +98,26 @@ const config = {
|
91
|
98
|
}
|
92
|
99
|
};
|
93
|
100
|
|
94
|
|
-export default [{
|
|
101
|
+module.exports = [
|
|
102
|
+
|
95
|
103
|
// The Webpack configuration to bundle app.bundle.js (aka APP).
|
|
104
|
+ Object.assign({}, config, {
|
|
105
|
+ entry: {
|
|
106
|
+ 'app.bundle': './app.js'
|
|
107
|
+ },
|
|
108
|
+ output: Object.assign({}, config.output, {
|
|
109
|
+ library: 'APP'
|
|
110
|
+ })
|
|
111
|
+ }),
|
96
|
112
|
|
97
|
|
- ...config,
|
98
|
|
- entry: {
|
99
|
|
- 'app.bundle': './app.js'
|
100
|
|
- },
|
101
|
|
- output: {
|
102
|
|
- ...config.output,
|
103
|
|
- library: 'APP'
|
104
|
|
- }
|
105
|
|
-}, {
|
106
|
113
|
// The Webpack configuration to bundle external_api.js (aka
|
107
|
114
|
// JitsiMeetExternalAPI).
|
108
|
|
-
|
109
|
|
- ...config,
|
110
|
|
- entry: {
|
111
|
|
- 'external_api': './modules/API/external/external_api.js'
|
112
|
|
- },
|
113
|
|
- output: {
|
114
|
|
- ...config.output,
|
115
|
|
- library: 'JitsiMeetExternalAPI'
|
116
|
|
- }
|
117
|
|
-}];
|
|
115
|
+ Object.assign({}, config, {
|
|
116
|
+ entry: {
|
|
117
|
+ 'external_api': './modules/API/external/external_api.js'
|
|
118
|
+ },
|
|
119
|
+ output: Object.assign({}, config.output, {
|
|
120
|
+ library: 'JitsiMeetExternalAPI'
|
|
121
|
+ })
|
|
122
|
+ })
|
|
123
|
+];
|