build and add profiler

This commit is contained in:
Sharon Kennedy 2020-06-25 23:03:22 -04:00
parent c80e3269c3
commit 0fcb7e6e07
6 changed files with 15932 additions and 21 deletions

18
dist/bookmarklet.js vendored

File diff suppressed because one or more lines are too long

18
dist/chatbox.js vendored

File diff suppressed because one or more lines are too long

7
dist/index.html vendored
View File

@ -13,8 +13,8 @@
<script src="./chatbox.js"></script> <script src="./chatbox.js"></script>
<script> <script>
var config = { var config = {
matrixServerUrl: 'https://matrix.safesupport.chat', matrixServerUrl: 'https://matrix.rhok.space',
botId: '@help-bot:safesupport.chat', botId: '@help-bot:rhok.space',
roomName: 'Support Chat', roomName: 'Support Chat',
termsUrl: 'https://tosdr.org/', termsUrl: 'https://tosdr.org/',
introMessage: "This chat application does not collect any of your personal data or any data from your use of this service.", introMessage: "This chat application does not collect any of your personal data or any data from your use of this service.",
@ -23,6 +23,9 @@
exitMessage: 'The chat is closed. You may close this window.', exitMessage: 'The chat is closed. You may close this window.',
chatUnavailableMessage: 'The chat service is not available right now. Please try again later.', chatUnavailableMessage: 'The chat service is not available right now. Please try again later.',
anonymousDisplayName: 'Anonymous', anonymousDisplayName: 'Anonymous',
position: 'bottom right',
size: 'large',
maxWaitTime: 6000*3,
} }
EmbeddableChatbox.mount(config); EmbeddableChatbox.mount(config);

15900
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@
"main": "dist/chatbox.js", "main": "dist/chatbox.js",
"scripts": { "scripts": {
"build": "NODE_ENV=production webpack-cli --mode production", "build": "NODE_ENV=production webpack-cli --mode production",
"build:profile": "webpack --mode production --config webpack.config.profile.js",
"start": "webpack-dev-server", "start": "webpack-dev-server",
"test": "jest", "test": "jest",
"test-update-snapshots": "jest --updateSnapshot", "test-update-snapshots": "jest --updateSnapshot",
@ -121,7 +122,7 @@
"style-loader": "1.1.2", "style-loader": "1.1.2",
"wait-for-expect": "^3.0.2", "wait-for-expect": "^3.0.2",
"webpack": "4.41.5", "webpack": "4.41.5",
"webpack-bundle-analyzer": "^3.7.0", "webpack-bundle-analyzer": "^3.8.0",
"webpack-cli": "3.3.10", "webpack-cli": "3.3.10",
"webpack-dev-server": "3.10.1", "webpack-dev-server": "3.10.1",
"webpack-obfuscator": "0.22.0", "webpack-obfuscator": "0.22.0",

View File

@ -0,0 +1,7 @@
const config = require('./webpack.config');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
config[0].plugins = config[0].plugins.concat([new BundleAnalyzerPlugin({ analyzerPort: 5555 })]);
module.exports = config;