splitting out libraries
This commit is contained in:
+14
-10
@@ -1,8 +1,4 @@
|
||||
<!--
|
||||
DEVELOPMENT version of the web app.
|
||||
It links to online babel transformer and the original JSX app script.
|
||||
-->
|
||||
|
||||
<!-- DEVELOPMENT version of the web app. -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -17,17 +13,25 @@
|
||||
<!-- Ask Google not to offer page translation -->
|
||||
<meta name="google" value="notranslate">
|
||||
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link id="shortcut-icon" rel="shortcut icon" href="img/logo32x32.png" type="image/png" />
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
<link rel="shortcut icon" id="shortcut-icon" href="img/logo32x32.png" type="image/png" />
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="img/logo192.png" type="image/png" />
|
||||
<link rel="canonical" href="https://api.tinode.co/" />
|
||||
<!-- Google's Roboto font -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,700"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,700" />
|
||||
<!-- Google's material design icons -->
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||
<!-- Styles for local elements -->
|
||||
<link rel="stylesheet" href="css/base.css" />
|
||||
<!-- ReactJs scripts -->
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/react@16/umd/react.development.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
|
||||
<!-- React-Intl -->
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/prop-types@15/prop-types.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/react-intl@2/dist/react-intl.js"></script>
|
||||
<!-- Firebase scripts -->
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/firebase@5.5.6/firebase-app.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/firebase@5.5.6/firebase-messaging.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
+33
-34
@@ -1,36 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Tinode</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="application-name" content="TinodeWeb">
|
||||
<meta name="description" content="Tinode instant messaging">
|
||||
<meta name="application-url" content="https://api.tinode.co/">
|
||||
<!-- Browser styling for Chrome, FF, Opera -->
|
||||
<meta name="theme-color" content="#3949AB">
|
||||
<!-- Ask Google not to offer page translation -->
|
||||
<meta name="google" value="notranslate">
|
||||
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link id="shortcut-icon" rel="shortcut icon" href="img/logo32x32.png" type="image/png" />
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="img/logo192.png" type="image/png" />
|
||||
<link rel="canonical" href="https://api.tinode.co/" />
|
||||
<!-- Google's Roboto font -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,700"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<!-- Google's material design icons -->
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
||||
<!-- Styles for local elements -->
|
||||
<link rel="stylesheet" href="css/base.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript><div id="noscript-alertbox"><div id="noscript-title">Javascript support is required.</div>
|
||||
<div id="noscript-content">It appears JavaScript is turned off or is not supported by your browser.
|
||||
TinodeWeb does not work without JavaScript. Please enable JavaScript by changing your browser options,
|
||||
then <a href="">try again</a>.</div></div></noscript>
|
||||
<div id="mountPoint"></div>
|
||||
<script src="firebase-init.js"></script>
|
||||
<script src="umd/index.prod.js"></script>
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<title>Tinode</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="application-name" content="TinodeWeb">
|
||||
<meta name="description" content="Tinode instant messaging">
|
||||
<meta name="application-url" content="https://api.tinode.co/">
|
||||
<meta name="theme-color" content="#3949AB">
|
||||
<meta name="google" value="notranslate">
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
<link rel="shortcut icon" id="shortcut-icon" href="img/logo32x32.png" type="image/png" />
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="img/logo192.png" type="image/png" />
|
||||
<link rel="canonical" href="https://api.tinode.co/" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,700" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||
<link rel="stylesheet" href="css/base.min.css" />
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/react@16.6.0/umd/react.production.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/react-dom@16.6.0/umd/react-dom.production.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/prop-types@15.6.2/prop-types.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/react-intl@2.7.2/dist/react-intl.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/firebase@5.5.6/firebase-app.js"></script>
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/firebase@5.5.6/firebase-messaging.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript><div id="noscript-alertbox"><div id="noscript-title">Javascript support is required.</div>
|
||||
<div id="noscript-content">It appears JavaScript is turned off or is not supported by your browser.
|
||||
TinodeWeb does not work without JavaScript. Please enable JavaScript by changing your browser options,
|
||||
then <a href="">try again</a>.</div></div></noscript>
|
||||
<div id="mountPoint"></div>
|
||||
<script src="firebase-init.js"></script>
|
||||
<script src="umd/index.prod.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// Must be located at the root.
|
||||
importScripts('https://unpkg.com/firebase@5.5.5/firebase-app.js');
|
||||
importScripts('https://unpkg.com/firebase@5.5.5/firebase-messaging.js');
|
||||
importScripts('https://unpkg.com/firebase@5.5.6/firebase-app.js');
|
||||
importScripts('https://unpkg.com/firebase@5.5.6/firebase-messaging.js');
|
||||
importScripts('firebase-init.js');
|
||||
|
||||
firebase.initializeApp(FIREBASE_INIT);
|
||||
|
||||
+88
-601
File diff suppressed because one or more lines are too long
+1
-45
File diff suppressed because one or more lines are too long
@@ -1,3 +1,5 @@
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
module.exports = config = {
|
||||
entry: [
|
||||
'./src/index.js',
|
||||
@@ -13,4 +15,28 @@ module.exports = config = {
|
||||
},
|
||||
],
|
||||
},
|
||||
output: {
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [
|
||||
// we specify a custom UglifyJsPlugin here to get source maps in production.
|
||||
new UglifyJsPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
uglifyOptions: {
|
||||
compress: true,
|
||||
mangle: true
|
||||
},
|
||||
sourceMap: true
|
||||
})
|
||||
]
|
||||
},
|
||||
externals: {
|
||||
'react': 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
'react-intl': 'ReactIntl',
|
||||
'firebase/app': 'firebase',
|
||||
'firebase/messaging': true
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user