Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Remove .babelrc to simplify React Native support

Lyubomir Marinov1edebf83ae68
diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index e69c55796a..0000000000
--- a/.babelrc
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugins": [
- "transform-object-rest-spread"
- ],
- "presets": [
- "es2015"
- ]
-}
diff --git a/package.json b/package.json
index f8e1369c04..f32ae3a8e3 100644
--- a/package.json
+++ b/package.json
@@ -38,10 +38,8 @@
"devDependencies": {
"babel-core": "*",
"babel-loader": "*",
- "babel-plugin-transform-object-rest-spread": "*",
"babel-polyfill": "*",
"babel-preset-es2015": "6.14.0",
- "babel-register": "*",
"clean-css": "*",
"css-loader": "*",
"eslint": "*",
diff --git a/webpack.config.babel.js b/webpack.config.js
similarity index 78%
rename from webpack.config.babel.js
rename to webpack.config.js
index b37b518823..d3362a7850 100644
--- a/webpack.config.babel.js
+++ b/webpack.config.js
@@ -1,16 +1,18 @@
/* global __dirname */
-import process from 'process';
+require('babel-polyfill'); // Define Object.assign() from ES6 in ES5.
-const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
-const minimize
+var process = require('process');
+
+var aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
+var minimize
= process.argv.indexOf('-p') != -1
|| process.argv.indexOf('--optimize-minimize') != -1;
-const strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
+var strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
// The base Webpack configuration to bundle the JavaScript artifacts of
// jitsi-meet such as app.bundle.js and external_api.js.
-const config = {
+var config = {
devtool: 'source-map',
module: {
loaders: [{
@@ -18,6 +20,11 @@ const config = {
exclude: __dirname + '/node_modules/',
loader: 'babel',
+ query: {
+ presets: [
+ 'es2015'
+ ]
+ },
test: /\.js$/
},{
// Expose jquery as the globals $ and jQuery because it is expected
@@ -91,27 +98,26 @@ const config = {
}
};
-export default [{
+module.exports = [
+
// The Webpack configuration to bundle app.bundle.js (aka APP).
+ Object.assign({}, config, {
+ entry: {
+ 'app.bundle': './app.js'
+ },
+ output: Object.assign({}, config.output, {
+ library: 'APP'
+ })
+ }),
- ...config,
- entry: {
- 'app.bundle': './app.js'
- },
- output: {
- ...config.output,
- library: 'APP'
- }
-}, {
// The Webpack configuration to bundle external_api.js (aka
// JitsiMeetExternalAPI).
-
- ...config,
- entry: {
- 'external_api': './modules/API/external/external_api.js'
- },
- output: {
- ...config.output,
- library: 'JitsiMeetExternalAPI'
- }
-}];
+ Object.assign({}, config, {
+ entry: {
+ 'external_api': './modules/API/external/external_api.js'
+ },
+ output: Object.assign({}, config.output, {
+ library: 'JitsiMeetExternalAPI'
+ })
+ })
+];