Browse Source

deps: update to webpack 4

master
Saúl Ibarra Corretgé 6 years ago
parent
commit
45291e1054
3 changed files with 3325 additions and 2154 deletions
  1. 3316
    2122
      package-lock.json
  2. 4
    4
      package.json
  3. 5
    28
      webpack.config.js

+ 3316
- 2122
package-lock.json
File diff suppressed because it is too large
View File


+ 4
- 4
package.json View File

50
     "jsc-android": "224109.1.0",
50
     "jsc-android": "224109.1.0",
51
     "jsrsasign": "8.0.12",
51
     "jsrsasign": "8.0.12",
52
     "jwt-decode": "2.2.0",
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
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
54
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
55
     "lodash": "4.17.11",
55
     "lodash": "4.17.11",
56
     "moment": "2.19.4",
56
     "moment": "2.19.4",
114
     "precommit-hook": "3.0.0",
114
     "precommit-hook": "3.0.0",
115
     "string-replace-loader": "1.3.0",
115
     "string-replace-loader": "1.3.0",
116
     "style-loader": "0.19.0",
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
   "engines": {
121
   "engines": {
122
     "node": ">=8.0.0",
122
     "node": ">=8.0.0",

+ 5
- 28
webpack.config.js View File

1
 /* global __dirname */
1
 /* global __dirname */
2
 
2
 
3
 const process = require('process');
3
 const process = require('process');
4
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
5
-const webpack = require('webpack');
6
 
4
 
7
 /**
5
 /**
8
  * The URL of the Jitsi Meet deployment to be proxy to in the context of
6
  * The URL of the Jitsi Meet deployment to be proxy to in the context of
15
     = process.argv.indexOf('-p') !== -1
13
     = process.argv.indexOf('-p') !== -1
16
         || process.argv.indexOf('--optimize-minimize') !== -1;
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
 // The base Webpack configuration to bundle the JavaScript artifacts of
16
 // The base Webpack configuration to bundle the JavaScript artifacts of
44
 // jitsi-meet such as app.bundle.js and external_api.js.
17
 // jitsi-meet such as app.bundle.js and external_api.js.
45
 const config = {
18
 const config = {
55
         }
28
         }
56
     },
29
     },
57
     devtool: 'source-map',
30
     devtool: 'source-map',
31
+    mode: minimize ? 'development' : 'production',
58
     module: {
32
     module: {
59
         rules: [ {
33
         rules: [ {
60
             // Transpile ES2015 (aka ES6) to ES5. Accept the JSX syntax by React
34
             // Transpile ES2015 (aka ES6) to ES5. Accept the JSX syntax by React
112
         // value that is a mock (/index.js).
86
         // value that is a mock (/index.js).
113
         __filename: true
87
         __filename: true
114
     },
88
     },
89
+    optimization: {
90
+        concatenateModules: minimize,
91
+        minimize
92
+    },
115
     output: {
93
     output: {
116
         filename: `[name]${minimize ? '.min' : ''}.js`,
94
         filename: `[name]${minimize ? '.min' : ''}.js`,
117
         path: `${__dirname}/build`,
95
         path: `${__dirname}/build`,
118
         publicPath: '/libs/',
96
         publicPath: '/libs/',
119
         sourceMapFilename: `[name].${minimize ? 'min' : 'js'}.map`
97
         sourceMapFilename: `[name].${minimize ? 'min' : 'js'}.map`
120
     },
98
     },
121
-    plugins,
122
     resolve: {
99
     resolve: {
123
         alias: {
100
         alias: {
124
             jquery: `jquery/dist/jquery${minimize ? '.min' : ''}.js`
101
             jquery: `jquery/dist/jquery${minimize ? '.min' : ''}.js`

Loading…
Cancel
Save