[Dev] Statoscope: Show bundle names, better reports (#1857)

This commit is contained in:
Alexander Zinchuk 2022-05-06 17:55:58 +01:00
parent 39cdd8e8e8
commit 74745bb1d9
5 changed files with 9 additions and 1178 deletions

View File

@ -19,6 +19,7 @@ const pageTemplate = `
<h3>Commits since ${version}</h3>\
<blockquote>This list is automatically updated when a new commit pushed to the beta repo</blockquote>\
<ul id="list"></ul>\
<blockquote>Last updated ${new Date().toLocaleDateString('en-CA')}</blockquote>\
</body>
`.trim();

1165
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -50,9 +50,9 @@
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@peculiar/webcrypto": "^1.3.3",
"@playwright/test": "^1.18.1",
"@statoscope/cli": "^5.20.1",
"@statoscope/webpack-plugin": "^5.20.1",
"@playwright/test": "^1.18.1",
"@testing-library/jest-dom": "^5.16.4",
"@types/croppie": "^2.6.1",
"@types/jest": "^27.4.1",
@ -68,7 +68,6 @@
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"dotenv": "^16.0.0",
"eslint": "^8.13.0",
"eslint-config-airbnb": "^19.0.4",

View File

@ -30,7 +30,7 @@ export async function loadModule<B extends Bundles, M extends BundleModules<B>>(
if (!LOAD_PROMISES[bundleName]) {
switch (bundleName) {
case Bundles.Auth:
LOAD_PROMISES[Bundles.Auth] = import('../bundles/auth');
LOAD_PROMISES[Bundles.Auth] = import(/* webpackChunkName: "BundleAuth" */ '../bundles/auth');
break;
case Bundles.Main:
if (DEBUG) {
@ -38,13 +38,13 @@ export async function loadModule<B extends Bundles, M extends BundleModules<B>>(
console.log('>>> START LOAD MAIN BUNDLE');
}
LOAD_PROMISES[Bundles.Main] = import('../bundles/main');
LOAD_PROMISES[Bundles.Main] = import(/* webpackChunkName: "BundleMain" */ '../bundles/main');
break;
case Bundles.Extra:
LOAD_PROMISES[Bundles.Extra] = import('../bundles/extra');
LOAD_PROMISES[Bundles.Extra] = import(/* webpackChunkName: "BundleExtra" */ '../bundles/extra');
break;
case Bundles.Calls:
LOAD_PROMISES[Bundles.Calls] = import('../bundles/calls');
LOAD_PROMISES[Bundles.Calls] = import(/* webpackChunkName: "BundleCalls" */ '../bundles/calls');
break;
}

View File

@ -10,7 +10,6 @@ const {
} = require('webpack');
const HtmlWebackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const StatoscopeWebpackPlugin = require('@statoscope/webpack-plugin').default;
const WebpackContextExtension = require('./dev/webpackContextExtension');
@ -169,13 +168,10 @@ module.exports = (env = {}, argv = {}) => {
devtool: 'source-map',
}),
...(argv['optimize-minimize'] && {
...(process.env.APP_ENV !== 'production' && {
optimization: {
minimize: !env.noMinify,
minimizer: [
new CssMinimizerPlugin(),
],
},
chunkIds: 'named',
}
}),
};
};