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

Bundle analysis with Statoscope #861

Merged
merged 1 commit into from
Mar 4, 2022
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
3 changes: 3 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:
body: ':stopwatch: Lighthouse report: ' + process.env.REPORT_URL
})

- name: Copy bundle analysis report
run: cp build/report-*.html ./.lighthouseci

- uses: actions/upload-artifact@v2
with:
name: lighthouse-report
Expand Down
12 changes: 11 additions & 1 deletion config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ const merge = require('webpack-merge');
const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const { default: StatoscopeWebpackPlugin } = require("@statoscope/webpack-plugin");

const bundleAnalyzerConfig = {
plugins: [
new StatoscopeWebpackPlugin({
open: false,
saveReportTo: "./build/report-[name].html",
}),
]
}

const prodConfig = {
name: "client-modern",
Expand Down Expand Up @@ -57,6 +67,6 @@ const es5Config = {
};

module.exports = [
merge.smart(commonConfig, prodConfig),
merge.smart(commonConfig, prodConfig, bundleAnalyzerConfig),
merge.smart(commonConfig, prodConfig, es5Config),
]
Loading