Parcourir la source

deps: update to webpack 4

j8
Saúl Ibarra Corretgé il y a 6 ans
Parent
révision
45291e1054
3 fichiers modifiés avec 3325 ajouts et 2154 suppressions
  1. 3316
    2122
      package-lock.json
  2. 4
    4
      package.json
  3. 5
    28
      webpack.config.js

+ 3316
- 2122
package-lock.json
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 4
- 4
package.json Voir le fichier

@@ -50,7 +50,7 @@
50 50
     "jsc-android": "224109.1.0",
51 51
     "jsrsasign": "8.0.12",
52 52
     "jwt-decode": "2.2.0",
53
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#03411c7488c32593b439fc80b239ab3b7abd5e11",
53
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#81dac6051eb7e86e51a94eca96eae10add9dc7fb",
54 54
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
55 55
     "lodash": "4.17.11",
56 56
     "moment": "2.19.4",
@@ -114,9 +114,9 @@
114 114
     "precommit-hook": "3.0.0",
115 115
     "string-replace-loader": "1.3.0",
116 116
     "style-loader": "0.19.0",
117
-    "uglifyjs-webpack-plugin": "1.2.2",
118
-    "webpack": "3.9.1",
119
-    "webpack-dev-server": "2.9.5"
117
+    "webpack": "4.26.1",
118
+    "webpack-cli": "3.1.2",
119
+    "webpack-dev-server": "3.1.10"
120 120
   },
121 121
   "engines": {
122 122
     "node": ">=8.0.0",

+ 5
- 28
webpack.config.js Voir le fichier

@@ -1,8 +1,6 @@
1 1
 /* global __dirname */
2 2
 
3 3
 const process = require('process');
4
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
5
-const webpack = require('webpack');
6 4
 
7 5
 /**
8 6
  * The URL of the Jitsi Meet deployment to be proxy to in the context of
@@ -15,31 +13,6 @@ const minimize
15 13
     = process.argv.indexOf('-p') !== -1
16 14
         || process.argv.indexOf('--optimize-minimize') !== -1;
17 15
 
18
-const plugins = [
19
-    new webpack.LoaderOptionsPlugin({
20
-        debug: !minimize,
21
-        minimize
22
-    })
23
-];
24
-
25
-if (minimize) {
26
-    // XXX Webpack's command line argument -p is not enough. Further
27
-    // optimizations are made possible by the use of DefinePlugin and NODE_ENV
28
-    // with value 'production'. For example, React takes advantage of these.
29
-    plugins.push(new webpack.DefinePlugin({
30
-        'process.env': {
31
-            NODE_ENV: JSON.stringify('production')
32
-        }
33
-    }));
34
-    plugins.push(new webpack.optimize.ModuleConcatenationPlugin());
35
-    plugins.push(new UglifyJsPlugin({
36
-        cache: true,
37
-        extractComments: true,
38
-        parallel: true,
39
-        sourceMap: true
40
-    }));
41
-}
42
-
43 16
 // The base Webpack configuration to bundle the JavaScript artifacts of
44 17
 // jitsi-meet such as app.bundle.js and external_api.js.
45 18
 const config = {
@@ -55,6 +28,7 @@ const config = {
55 28
         }
56 29
     },
57 30
     devtool: 'source-map',
31
+    mode: minimize ? 'development' : 'production',
58 32
     module: {
59 33
         rules: [ {
60 34
             // Transpile ES2015 (aka ES6) to ES5. Accept the JSX syntax by React
@@ -112,13 +86,16 @@ const config = {
112 86
         // value that is a mock (/index.js).
113 87
         __filename: true
114 88
     },
89
+    optimization: {
90
+        concatenateModules: minimize,
91
+        minimize
92
+    },
115 93
     output: {
116 94
         filename: `[name]${minimize ? '.min' : ''}.js`,
117 95
         path: `${__dirname}/build`,
118 96
         publicPath: '/libs/',
119 97
         sourceMapFilename: `[name].${minimize ? 'min' : 'js'}.map`
120 98
     },
121
-    plugins,
122 99
     resolve: {
123 100
         alias: {
124 101
             jquery: `jquery/dist/jquery${minimize ? '.min' : ''}.js`

Chargement…
Annuler
Enregistrer