Speed webpack up

This commit is contained in:
Lyubo Marinov 2017-06-15 22:47:04 -05:00
parent 0d7aea377a
commit 1da49d86a1
2 changed files with 37 additions and 45 deletions

51
app.js
View File

@ -15,28 +15,39 @@ import 'aui-experimental-css';
window.toastr = require('toastr');
export conference from './conference';
export API from './modules/API';
export keyboardshortcut from './modules/keyboardshortcut/keyboardshortcut';
export remoteControl from './modules/remotecontrol/RemoteControl';
export settings from './modules/settings/Settings';
export translation from './modules/translation/translation';
export UI from './modules/UI/UI';
import conference from './conference';
import API from './modules/API';
import keyboardshortcut from './modules/keyboardshortcut/keyboardshortcut';
import remoteControl from './modules/remotecontrol/RemoteControl';
import settings from './modules/settings/Settings';
import translation from './modules/translation/translation';
import UI from './modules/UI/UI';
// Used by do_external_connect.js if we receive the attach data after connect
// was already executed. status property can be 'initialized', 'ready', or
// 'connecting'. We are interested in 'ready' status only which means that
// connect was executed but we have to wait for the attach data. In status
// 'ready' handler property will be set to a function that will finish the
// connect process when the attach data or error is received.
export const connect = {
handler: null,
status: 'initialized'
};
window.APP = {
API,
conference,
// Used for automated performance tests
export const connectionTimes = {
'index.loaded': window.indexLoadedTime
// Used by do_external_connect.js if we receive the attach data after
// connect was already executed. status property can be 'initialized',
// 'ready', or 'connecting'. We are interested in 'ready' status only which
// means that connect was executed but we have to wait for the attach data.
// In status 'ready' handler property will be set to a function that will
// finish the connect process when the attach data or error is received.
connect: {
handler: null,
status: 'initialized'
},
// Used for automated performance tests.
connectionTimes: {
'index.loaded': window.indexLoadedTime
},
keyboardshortcut,
remoteControl,
settings,
translation,
UI
};
// TODO The execution of the mobile app starts from react/index.native.js.

View File

@ -147,7 +147,6 @@ const config = {
},
output: {
filename: `[name]${minimize ? '.min' : ''}.js`,
libraryTarget: 'umd',
path: `${__dirname}/build`,
publicPath: '/libs/',
sourceMapFilename: `[name].${minimize ? 'min' : 'js'}.map`
@ -175,36 +174,19 @@ const config = {
}
};
const configs = [
// The Webpack configuration to bundle app.bundle.js (aka APP).
module.exports = [
Object.assign({}, config, {
entry: {
'app.bundle': [
// XXX Required by at least IE11 at the time of this writing.
'babel-polyfill',
'./app.js'
]
},
output: Object.assign({}, config.output, {
library: 'APP'
})
}),
],
// The Webpack configuration to bundle device_selection_popup_bundle.js
// (i.e. js file for the device selection popup dialog).
Object.assign({}, config, {
entry: {
'device_selection_popup_bundle':
'./react/features/device-selection/popup.js'
}
}),
'./react/features/device-selection/popup.js',
// The Webpack configuration to bundle do_external_connect.js (which
// attempts to optimize Jitsi Meet's XMPP connection and, consequently, is
// also known as HTTP pre-bind).
Object.assign({}, config, {
entry: {
'do_external_connect':
'./connection_optimization/do_external_connect.js'
}
@ -217,13 +199,12 @@ const configs = [
'external_api': './modules/API/external/index.js'
},
output: Object.assign({}, config.output, {
library: 'JitsiMeetExternalAPI'
library: 'JitsiMeetExternalAPI',
libraryTarget: 'umd'
})
})
];
module.exports = configs;
/**
* Determines whether a specific (HTTP) request is to bypass the proxy of
* webpack-dev-server (i.e. is to be handled by the proxy target) and, if not,