Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dx] Tweak profiling to include the webpack visualization from CI #180335

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,7 @@
"@types/vinyl-fs": "^3.0.2",
"@types/watchpack": "^1.1.5",
"@types/webpack": "^4.41.3",
"@types/webpack-bundle-analyzer": "^4.7.0",
"@types/webpack-env": "^1.15.3",
"@types/webpack-merge": "^4.1.5",
"@types/webpack-sources": "^0.1.4",
Expand Down
7 changes: 7 additions & 0 deletions packages/kbn-optimizer/src/worker/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src';
import StatoscopeWebpackPlugin from '@statoscope/webpack-plugin';
// @ts-expect-error
import VisualizerPlugin from 'webpack-visualizer-plugin2';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';

import { Bundle, BundleRemotes, WorkerConfig, parseDllManifest } from '../common';
import { BundleRemotesPlugin } from './bundle_remotes_plugin';
Expand Down Expand Up @@ -92,6 +93,12 @@ export function getWebpackConfig(
saveReportTo: `${bundle.outputDir}/${bundle.id}.statoscope.html`,
}),
new VisualizerPlugin({ filename: `${bundle.id}.visualizer.html` }),
new BundleAnalyzerPlugin({
analyzerMode: 'static',
reportFilename: `${bundle.id}.analyzer.html`,
openAnalyzer: false,
logLevel: 'silent',
}),
]
: []),
// @ts-ignore something is wrong with the StatoscopeWebpackPlugin type.
Expand Down
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10812,6 +10812,15 @@
"@types/node" "*"
chokidar "^2.1.2"

"@types/webpack-bundle-analyzer@^4.7.0":
version "4.7.0"
resolved "https://registry.yarnpkg.com/@types/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.7.0.tgz#fe199e724ce3d38705f6f1ba4d62429b7c360541"
integrity sha512-c5i2ThslSNSG8W891BRvOd/RoCjI2zwph8maD22b1adtSns20j+0azDDMCK06DiVrzTgnwiDl5Ntmu1YRJw8Sg==
dependencies:
"@types/node" "*"
tapable "^2.2.0"
webpack "^5"

"@types/webpack-env@^1.15.3", "@types/webpack-env@^1.16.0":
version "1.16.3"
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.16.3.tgz#b776327a73e561b71e7881d0cd6d34a1424db86a"
Expand Down