Parcourir la source

build: drop dependency on babel-pollyfill

It's no longer needed for building since Node >= 6 already has the minimum
required ES6 syntax. In addition, drop it from app.js since we use Webpack with
the Babel loader to transpile ES5 to ES6.
j8
Saúl Ibarra Corretgé il y a 8 ans
Parent
révision
673dc6e873
3 fichiers modifiés avec 12 ajouts et 16 suppressions
  1. 0
    1
      app.js
  2. 0
    1
      package.json
  3. 12
    14
      webpack.config.js

+ 0
- 1
app.js Voir le fichier

@@ -1,6 +1,5 @@
1 1
 /* application specific logic */
2 2
 
3
-import "babel-polyfill";
4 3
 import "jquery";
5 4
 import "jquery-contextmenu";
6 5
 import "jquery-ui";

+ 0
- 1
package.json Voir le fichier

@@ -65,7 +65,6 @@
65 65
     "babel-core": "6.24.0",
66 66
     "babel-eslint": "7.2.1",
67 67
     "babel-loader": "6.4.1",
68
-    "babel-polyfill": "6.23.0",
69 68
     "babel-preset-es2015": "6.24.0",
70 69
     "babel-preset-react": "6.23.0",
71 70
     "babel-preset-stage-1": "6.22.0",

+ 12
- 14
webpack.config.js Voir le fichier

@@ -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/')) {

Chargement…
Annuler
Enregistrer