deps: update to webpack 4
This commit is contained in:
parent
66832ada68
commit
45291e1054
4860
package-lock.json
generated
4860
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -50,7 +50,7 @@
|
|||||||
"jsc-android": "224109.1.0",
|
"jsc-android": "224109.1.0",
|
||||||
"jsrsasign": "8.0.12",
|
"jsrsasign": "8.0.12",
|
||||||
"jwt-decode": "2.2.0",
|
"jwt-decode": "2.2.0",
|
||||||
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#03411c7488c32593b439fc80b239ab3b7abd5e11",
|
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#81dac6051eb7e86e51a94eca96eae10add9dc7fb",
|
||||||
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
|
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
|
||||||
"lodash": "4.17.11",
|
"lodash": "4.17.11",
|
||||||
"moment": "2.19.4",
|
"moment": "2.19.4",
|
||||||
@ -114,9 +114,9 @@
|
|||||||
"precommit-hook": "3.0.0",
|
"precommit-hook": "3.0.0",
|
||||||
"string-replace-loader": "1.3.0",
|
"string-replace-loader": "1.3.0",
|
||||||
"style-loader": "0.19.0",
|
"style-loader": "0.19.0",
|
||||||
"uglifyjs-webpack-plugin": "1.2.2",
|
"webpack": "4.26.1",
|
||||||
"webpack": "3.9.1",
|
"webpack-cli": "3.1.2",
|
||||||
"webpack-dev-server": "2.9.5"
|
"webpack-dev-server": "3.1.10"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.0.0",
|
"node": ">=8.0.0",
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
/* global __dirname */
|
/* global __dirname */
|
||||||
|
|
||||||
const process = require('process');
|
const process = require('process');
|
||||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
|
||||||
const webpack = require('webpack');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URL of the Jitsi Meet deployment to be proxy to in the context of
|
* The URL of the Jitsi Meet deployment to be proxy to in the context of
|
||||||
@ -15,31 +13,6 @@ const minimize
|
|||||||
= process.argv.indexOf('-p') !== -1
|
= process.argv.indexOf('-p') !== -1
|
||||||
|| process.argv.indexOf('--optimize-minimize') !== -1;
|
|| process.argv.indexOf('--optimize-minimize') !== -1;
|
||||||
|
|
||||||
const plugins = [
|
|
||||||
new webpack.LoaderOptionsPlugin({
|
|
||||||
debug: !minimize,
|
|
||||||
minimize
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
if (minimize) {
|
|
||||||
// XXX Webpack's command line argument -p is not enough. Further
|
|
||||||
// optimizations are made possible by the use of DefinePlugin and NODE_ENV
|
|
||||||
// with value 'production'. For example, React takes advantage of these.
|
|
||||||
plugins.push(new webpack.DefinePlugin({
|
|
||||||
'process.env': {
|
|
||||||
NODE_ENV: JSON.stringify('production')
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
plugins.push(new webpack.optimize.ModuleConcatenationPlugin());
|
|
||||||
plugins.push(new UglifyJsPlugin({
|
|
||||||
cache: true,
|
|
||||||
extractComments: true,
|
|
||||||
parallel: true,
|
|
||||||
sourceMap: true
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
// The base Webpack configuration to bundle the JavaScript artifacts of
|
// The base Webpack configuration to bundle the JavaScript artifacts of
|
||||||
// jitsi-meet such as app.bundle.js and external_api.js.
|
// jitsi-meet such as app.bundle.js and external_api.js.
|
||||||
const config = {
|
const config = {
|
||||||
@ -55,6 +28,7 @@ const config = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
mode: minimize ? 'development' : 'production',
|
||||||
module: {
|
module: {
|
||||||
rules: [ {
|
rules: [ {
|
||||||
// Transpile ES2015 (aka ES6) to ES5. Accept the JSX syntax by React
|
// Transpile ES2015 (aka ES6) to ES5. Accept the JSX syntax by React
|
||||||
@ -112,13 +86,16 @@ const config = {
|
|||||||
// value that is a mock (/index.js).
|
// value that is a mock (/index.js).
|
||||||
__filename: true
|
__filename: true
|
||||||
},
|
},
|
||||||
|
optimization: {
|
||||||
|
concatenateModules: minimize,
|
||||||
|
minimize
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: `[name]${minimize ? '.min' : ''}.js`,
|
filename: `[name]${minimize ? '.min' : ''}.js`,
|
||||||
path: `${__dirname}/build`,
|
path: `${__dirname}/build`,
|
||||||
publicPath: '/libs/',
|
publicPath: '/libs/',
|
||||||
sourceMapFilename: `[name].${minimize ? 'min' : 'js'}.map`
|
sourceMapFilename: `[name].${minimize ? 'min' : 'js'}.map`
|
||||||
},
|
},
|
||||||
plugins,
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
jquery: `jquery/dist/jquery${minimize ? '.min' : ''}.js`
|
jquery: `jquery/dist/jquery${minimize ? '.min' : ''}.js`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user