diff --git a/keyserver/src/responders/landing-handler.js b/keyserver/src/responders/landing-handler.js
--- a/keyserver/src/responders/landing-handler.js
+++ b/keyserver/src/responders/landing-handler.js
@@ -65,23 +65,26 @@
return assetInfo;
}
try {
- const assetsString = await readFile('../landing/dist/assets.json', 'utf8');
- const assets = JSON.parse(assetsString);
+ const manifestString = await readFile(
+ '../landing/dist/manifest.json',
+ 'utf8',
+ );
+ const manifest = JSON.parse(manifestString);
assetInfo = {
- jsURL: `compiled/${assets.browser.js}`,
+ jsURL: `compiled/${manifest['browser.js']}`,
fontURLs: [googleFontsURL, iaDuoFontsURL],
cssInclude: html`
`,
};
return assetInfo;
} catch {
throw new Error(
- 'Could not load assets.json for landing build. ' +
+ 'Could not load manifest.json for landing build. ' +
'Did you forget to run `yarn dev` in the landing folder?',
);
}
diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js
--- a/keyserver/src/responders/website-responders.js
+++ b/keyserver/src/responders/website-responders.js
@@ -85,24 +85,24 @@
return assetInfo;
}
try {
- const assetsString = await readFile('../web/dist/assets.json', 'utf8');
- const assets = JSON.parse(assetsString);
+ const manifestString = await readFile('../web/dist/manifest.json', 'utf8');
+ const manifest = JSON.parse(manifestString);
assetInfo = {
- jsURL: `compiled/${assets.browser.js}`,
+ jsURL: `compiled/${manifest['browser.js']}`,
fontsURL: googleFontsURL,
cssInclude: html`
`,
- olmFilename: assets[''].wasm,
+ olmFilename: manifest['olm.wasm'],
};
return assetInfo;
} catch {
throw new Error(
- 'Could not load assets.json for web build. ' +
+ 'Could not load manifest.json for web build. ' +
'Did you forget to run `yarn dev` in the web folder?',
);
}
diff --git a/landing/package.json b/landing/package.json
--- a/landing/package.json
+++ b/landing/package.json
@@ -20,13 +20,13 @@
"@babel/preset-env": "^7.13.12",
"@babel/preset-flow": "^7.13.13",
"@babel/preset-react": "^7.13.13",
- "assets-webpack-plugin": "^7.1.1",
"babel-plugin-transform-remove-console": "^6.9.4",
"concurrently": "^5.3.0",
"flow-bin": "^0.182.0",
"flow-typed": "^3.2.1",
"webpack-cli": "^5.0.1",
- "webpack-dev-server": "^4.11.1"
+ "webpack-dev-server": "^4.11.1",
+ "webpack-manifest-plugin": "^5.0.0"
},
"dependencies": {
"@babel/runtime": "^7.13.10",
diff --git a/landing/webpack.config.cjs b/landing/webpack.config.cjs
--- a/landing/webpack.config.cjs
+++ b/landing/webpack.config.cjs
@@ -1,5 +1,5 @@
-const AssetsPlugin = require('assets-webpack-plugin');
const path = require('path');
+const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const {
createProdBrowserConfig,
@@ -46,10 +46,8 @@
const baseProdBrowserConfig = {
...baseBrowserConfig,
plugins: [
- new AssetsPlugin({
- filename: 'assets.json',
- path: path.join(__dirname, 'dist'),
- removeFullPathAutoPrefix: true,
+ new WebpackManifestPlugin({
+ publicPath: '',
}),
],
};
diff --git a/web/package.json b/web/package.json
--- a/web/package.json
+++ b/web/package.json
@@ -21,7 +21,6 @@
"@babel/preset-env": "^7.13.12",
"@babel/preset-flow": "^7.13.13",
"@babel/preset-react": "^7.13.13",
- "assets-webpack-plugin": "^7.1.1",
"babel-jest": "^26.6.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"concurrently": "^5.3.0",
@@ -31,7 +30,8 @@
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"webpack-cli": "^5.0.1",
- "webpack-dev-server": "^4.11.1"
+ "webpack-dev-server": "^4.11.1",
+ "webpack-manifest-plugin": "^5.0.0"
},
"dependencies": {
"@babel/runtime": "^7.13.10",
diff --git a/web/webpack.config.cjs b/web/webpack.config.cjs
--- a/web/webpack.config.cjs
+++ b/web/webpack.config.cjs
@@ -1,6 +1,6 @@
-const AssetsPlugin = require('assets-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const path = require('path');
+const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const {
createProdBrowserConfig,
@@ -71,10 +71,8 @@
},
],
}),
- new AssetsPlugin({
- filename: 'assets.json',
- path: path.join(__dirname, 'dist'),
- removeFullPathAutoPrefix: true,
+ new WebpackManifestPlugin({
+ publicPath: '',
}),
],
};
diff --git a/yarn.lock b/yarn.lock
--- a/yarn.lock
+++ b/yarn.lock
@@ -6720,15 +6720,6 @@
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
-assets-webpack-plugin@^7.1.1:
- version "7.1.1"
- resolved "https://registry.yarnpkg.com/assets-webpack-plugin/-/assets-webpack-plugin-7.1.1.tgz#0b988bf904a1895cae5820957ad82aa402673894"
- integrity sha512-HwsDcu9UR9kv7AtiyMpUO9fARn94SbrLzw5+aQ59RnOZJeet+EVHmOrMwXl8fZ8cZmdZ9Sbl1/l+fn7ymiyfMg==
- dependencies:
- camelcase "^6.0.0"
- escape-string-regexp "^4.0.0"
- lodash "^4.17.21"
-
assign-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
@@ -21409,6 +21400,11 @@
resolved "https://registry.yarnpkg.com/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz#8605695563294dffb2c9796d602bd8459f7a0dd5"
integrity sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==
+source-list-map@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
+ integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
+
source-map-js@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
@@ -22155,7 +22151,7 @@
string-width "^4.2.0"
strip-ansi "^6.0.0"
-tapable@^2.1.1, tapable@^2.2.0:
+tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
@@ -23584,6 +23580,14 @@
webpack-dev-middleware "^5.3.1"
ws "^8.4.2"
+webpack-manifest-plugin@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/webpack-manifest-plugin/-/webpack-manifest-plugin-5.0.0.tgz#084246c1f295d1b3222d36e955546433ca8df803"
+ integrity sha512-8RQfMAdc5Uw3QbCQ/CBV/AXqOR8mt03B6GJmRbhWopE8GzRfEpn+k0ZuWywxW+5QZsffhmFDY1J6ohqJo+eMuw==
+ dependencies:
+ tapable "^2.0.0"
+ webpack-sources "^2.2.0"
+
webpack-merge@^5.7.3:
version "5.8.0"
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61"
@@ -23592,6 +23596,14 @@
clone-deep "^4.0.1"
wildcard "^2.0.0"
+webpack-sources@^2.2.0:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd"
+ integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==
+ dependencies:
+ source-list-map "^2.0.1"
+ source-map "^0.6.1"
+
webpack-sources@^3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"