From 34b0bfc315c6f3cca866cd580813c3463ddb6ac3 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 18 Aug 2020 23:32:53 -0400 Subject: [PATCH] Revert "use dynamic js bundle urls" This reverts commit cb8a801d4a0a5b8a53a40066b1ed4b6ac4cfe5e4. --- static/index-web.html | 1 + web/bundle-id.js | 8 -------- web/package.json | 3 +-- web/src/html.js | 7 +------ web/webpack.config.js | 4 +--- web/yarn.lock | 5 ----- 6 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 web/bundle-id.js diff --git a/static/index-web.html b/static/index-web.html index b9ffe6fd2..f97bade35 100644 --- a/static/index-web.html +++ b/static/index-web.html @@ -3,6 +3,7 @@ + diff --git a/web/bundle-id.js b/web/bundle-id.js deleted file mode 100644 index 80530a28d..000000000 --- a/web/bundle-id.js +++ /dev/null @@ -1,8 +0,0 @@ -const uuid = require('uuid/v4'); -const jsBundleId = uuid(); - -function getJsBundleId() { - return jsBundleId; -} - -module.exports = { getJsBundleId }; diff --git a/web/package.json b/web/package.json index a8c6983ab..69547e350 100644 --- a/web/package.json +++ b/web/package.json @@ -34,8 +34,7 @@ "lbry-redux": "lbryio/lbry-redux#c107d9cc4c4b2cc31f182f196ab6a033aefe976e", "lbryinc": "lbryio/lbryinc#6a52f8026cdc7cd56d200fb5c46f852e0139bbeb", "mysql": "^2.17.1", - "node-fetch": "^2.6.0", - "uuid": "^8.3.0" + "node-fetch": "^2.6.0" }, "devDependencies": { "@babel/core": "^7.0.0", diff --git a/web/src/html.js b/web/src/html.js index ee38225cf..3532d6e83 100644 --- a/web/src/html.js +++ b/web/src/html.js @@ -14,16 +14,11 @@ const { getClaim } = require('./chainquery'); const { parseURI } = require('lbry-redux'); const fs = require('fs'); const path = require('path'); -const { getJsBundleId } = require('../bundle-id.js'); -const jsBundleId = getJsBundleId(); function insertToHead(fullHtml, htmlToInsert) { return fullHtml.replace( /.*/s, - ` - ${htmlToInsert || buildOgMetadata()} - - ` + htmlToInsert || buildOgMetadata() ); } diff --git a/web/webpack.config.js b/web/webpack.config.js index 197bfeea5..c89753fb2 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -6,7 +6,6 @@ const baseConfig = require('../webpack.base.config.js'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const { DefinePlugin, ProvidePlugin } = require('webpack'); const SentryWebpackPlugin = require('@sentry/webpack-plugin'); -const { getJsBundleId } = require('./bundle-id.js'); const { insertToHead, buildBasicOgMetadata } = require('./src/html'); const { insertVariableXml, getOpenSearchXml } = require('./src/xml'); @@ -17,7 +16,6 @@ const DIST_ROOT = path.resolve(__dirname, 'dist/'); const WEB_PLATFORM_ROOT = __dirname; const isProduction = process.env.NODE_ENV === 'production'; const hasSentryToken = process.env.SENTRY_AUTH_TOKEN !== undefined; -const jsBundleId = getJsBundleId(); const copyWebpackCommands = [ { @@ -82,7 +80,7 @@ if (isProduction && hasSentryToken) { const webConfig = { target: 'web', entry: { - [`ui-${jsBundleId}`]: '../ui/index.jsx', + ui: '../ui/index.jsx', }, output: { filename: '[name].js', diff --git a/web/yarn.lock b/web/yarn.lock index 66d0cf9a0..b43340d3b 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -5413,11 +5413,6 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== -uuid@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" - integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== - vary@^1.1.2, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"