fidelity: fix eval edge case (via wombat), enable http->https check for wacz sources (via wabac.js)

dependency updates:
- switch to webpack 5 and related build dependencies
- update litelement -> 'lit'
- wabac.js 2.9.2, wombat 1.3.4

search:
- update to latest flexsearch
- optimize search by using single-field index

bump to 1.5.3
This commit is contained in:
Ilya Kreymer
2021-09-18 12:32:00 -07:00
parent d341c03350
commit a261a61721
22 changed files with 1386 additions and 4310 deletions
+29 -3
View File
@@ -4,6 +4,7 @@ const path = require("path");
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const package_json = require("./package.json");
// fake url used in app to serve files
@@ -25,6 +26,23 @@ const BANNER_TEXT = "'[name].js is part of ReplayWeb.page (https://replayweb.pag
const IPFS_CORE_URL = `https://cdn.jsdelivr.net/npm/ipfs-core@${package_json.dependencies["ipfs-core"].replace("^", "")}/dist/index.min.js`;
const fallback = {
"stream": require.resolve("stream-browserify"),
"querystring": require.resolve("querystring-es3"),
"url": require.resolve("url/"),
"buffer": false,
};
const optimization = {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: false,
}),
],
};
const electronMainConfig = (/*env, argv*/) => {
return {
target: "electron-main",
@@ -32,12 +50,13 @@ const electronMainConfig = (/*env, argv*/) => {
entry: {
"electron": "./src/electron-main.js",
},
optimization,
resolve: {
alias: {
"abort-controller": "abort-controller/dist/abort-controller.js",
"dlv": "dlv/dist/dlv.js",
"bignumber.js": "bignumber.js/bignumber.js",
"multiformats/hashes/sha2": "multiformats/cjs/src/hashes/sha2.js"
//"multiformats/hashes/sha2": "multiformats/cjs/src/hashes/sha2.js"
}
},
output: {
@@ -77,6 +96,7 @@ const electronPreloadConfig = (/*env, argv*/) => {
entry: {
"preload": "./src/electron-preload.js",
},
optimization,
plugins: [
new webpack.BannerPlugin(BANNER_TEXT),
@@ -100,6 +120,9 @@ const browserConfig = (/*env, argv*/) => {
"sw": "./src/sw.js"
},
optimization,
resolve: {fallback},
output: {
path: path.join(__dirname),
filename: "[name].js",
@@ -116,14 +139,17 @@ const browserConfig = (/*env, argv*/) => {
compress: true,
port: 9990,
open: false,
contentBase: path.join(__dirname),
publicPath: "/"
static: path.join(__dirname),
//publicPath: "/"
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
new webpack.ProvidePlugin({
process: "process/browser",
}),
new MiniCssExtractPlugin(),
new webpack.DefinePlugin({
__SW_NAME__: JSON.stringify("sw.js"),