split tinode-sdk into a separate file

This commit is contained in:
or-else
2019-10-03 18:15:29 +03:00
parent 22710adbe3
commit 8e9349b58b
11 changed files with 7056 additions and 2540 deletions
+8 -1
View File
@@ -1,4 +1,5 @@
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const path = require('path');
module.exports = (env, argv) => {
@@ -42,12 +43,18 @@ module.exports = (env, argv) => {
maxEntrypointSize: 262144,
maxAssetSize: 262144
},
plugins: [
new CopyPlugin([
{ from: `node_modules/tinode-sdk/umd/tinode.${mode}.js`, to: `tinode.${mode}.js` },
]),
],
externals: {
'react': 'React',
'react-dom': 'ReactDOM',
'react-intl': 'ReactIntl',
'firebase/app': 'firebase',
'firebase/messaging': ['firebase', 'messaging']
'firebase/messaging': ['firebase', 'messaging'],
'tinode-sdk': 'Tinode',
},
};
}