mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-15 15:10:31 -08:00
feat: add stats.json to out, and prepare report
This commit is contained in:
parent
55f0b7b6fc
commit
7e615fe86c
2 changed files with 23 additions and 7 deletions
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
|
@ -70,6 +70,12 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get Renderer Bundle Stats
|
||||
uses: vio/bundle-stats-action@v1
|
||||
with:
|
||||
webpack-stats-path: 'out/webpack-stats-renderer.json'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
MacOS:
|
||||
runs-on: macos-latest
|
||||
|
||||
|
|
@ -119,6 +125,12 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get Renderer Bundle Stats
|
||||
uses: vio/bundle-stats-action@v1
|
||||
with:
|
||||
webpack-stats-path: 'out/webpack-stats-renderer.json'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
|
|
@ -173,3 +185,9 @@ jobs:
|
|||
files: out/make/**/*.exe
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get Renderer Bundle Stats
|
||||
uses: vio/bundle-stats-action@v1
|
||||
with:
|
||||
webpack-stats-path: 'out/webpack-stats-renderer.json'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -12,13 +12,9 @@ const ThreadsPlugin = require('threads-plugin');
|
|||
const ExternalsPlugin = require('webpack5-externals-plugin');
|
||||
const EventHooksPlugin = require('event-hooks-webpack-plugin');
|
||||
const WebpackBar = require('webpackbar');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
|
||||
const shared = [
|
||||
// this will generate 150M size of stats.json, and we have no way to ignore it (ignore option is not working for things inside `.webpack` folder)
|
||||
// process.env.NODE_ENV === 'production' ? new BundleAnalyzerPlugin({ generateStatsFile: true, analyzerMode: 'disabled' }) : undefined
|
||||
];
|
||||
|
||||
exports.main = _.compact([
|
||||
// we only need one instance of TsChecker, it will check main and renderer all together
|
||||
new ForkTsCheckerWebpackPlugin(),
|
||||
|
|
@ -49,7 +45,6 @@ exports.main = _.compact([
|
|||
plugins: ['ExternalsPlugin'],
|
||||
}),
|
||||
new WebpackBar(),
|
||||
...shared,
|
||||
]);
|
||||
|
||||
exports.renderer = [
|
||||
|
|
@ -73,5 +68,8 @@ exports.renderer = [
|
|||
},
|
||||
),
|
||||
new WebpackBar(),
|
||||
...shared,
|
||||
process.env.NODE_ENV === 'production'
|
||||
? // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
new BundleAnalyzerPlugin({ generateStatsFile: true, analyzerMode: 'disabled', statsFilename: '../../out/webpack-stats-renderer.json' })
|
||||
: undefined,
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue