@mui/internal-bundle-size-checker 1.0.9-canary.26 → 1.0.9-canary.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,8 +19,12 @@ bundle-size-checker [options]
19
19
 
20
20
  Options:
21
21
 
22
- - `--analyze`: Creates a webpack-bundle-analyzer report for each bundle
22
+ - `--analyze`: Creates a report for each bundle (using rollup-plugin-visualizer)
23
+ - `--debug`: Build with readable output (no name mangling or whitespace collapse, but still tree-shake)
24
+ - `--verbose`: Show more detailed information during compilation
23
25
  - `--output`, `-o`: Path to output the size snapshot JSON file
26
+ - `--filter`, `-F`: Filter entry points by glob pattern(s) applied to their IDs
27
+ - `--concurrency`, `-c`: Number of workers to use for parallel processing
24
28
 
25
29
  ### Configuration
26
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-bundle-size-checker",
3
- "version": "1.0.9-canary.26",
3
+ "version": "1.0.9-canary.28",
4
4
  "description": "Bundle size checker for MUI packages.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -25,7 +25,7 @@
25
25
  "@octokit/rest": "^22.0.0",
26
26
  "chalk": "^5.5.0",
27
27
  "env-ci": "^11.1.1",
28
- "execa": "^7.2.0",
28
+ "execa": "^9.6.0",
29
29
  "fast-glob": "^3.3.3",
30
30
  "git-url-parse": "^16.1.0",
31
31
  "micromatch": "^4.0.8",
@@ -39,7 +39,7 @@
39
39
  "@types/micromatch": "^4.0.9",
40
40
  "@types/yargs": "^17.0.33"
41
41
  },
42
- "gitSha": "5238a56c6d2269b22a45f2714069199e83831dcc",
42
+ "gitSha": "d7fa7ba40083997d77cee9a4403c4e4cd6ef3d48",
43
43
  "scripts": {
44
44
  "typescript": "tsc -p tsconfig.json",
45
45
  "test": "pnpm -w test --project @mui/internal-bundle-size-checker"
package/src/builder.js CHANGED
@@ -70,7 +70,7 @@ async function createViteConfig(entry, args) {
70
70
 
71
71
  build: {
72
72
  write: true,
73
- minify: true,
73
+ minify: args.debug ? 'esbuild' : true,
74
74
  outDir,
75
75
  emptyOutDir: true,
76
76
  rollupOptions: {
@@ -100,6 +100,11 @@ async function createViteConfig(entry, args) {
100
100
 
101
101
  esbuild: {
102
102
  legalComments: 'none',
103
+ ...(args.debug && {
104
+ minifyIdentifiers: false,
105
+ minifyWhitespace: false,
106
+ minifySyntax: true, // This enables tree-shaking and other safe optimizations
107
+ }),
103
108
  },
104
109
 
105
110
  define: {
package/src/cli.js CHANGED
@@ -173,6 +173,12 @@ yargs(process.argv.slice(2))
173
173
  describe: 'Show more detailed information during compilation.',
174
174
  type: 'boolean',
175
175
  })
176
+ .option('debug', {
177
+ default: false,
178
+ describe:
179
+ 'Build with readable output (no name mangling or whitespace collapse, but still tree-shake).',
180
+ type: 'boolean',
181
+ })
176
182
  .option('output', {
177
183
  alias: 'o',
178
184
  describe:
@@ -29,6 +29,9 @@ async function loadConfigFile(configPath) {
29
29
  resolvedConfig = await config;
30
30
  } else if (typeof config === 'function') {
31
31
  resolvedConfig = await config();
32
+ } else {
33
+ // Handle plain config objects
34
+ resolvedConfig = config;
32
35
  }
33
36
 
34
37
  return resolvedConfig;
package/src/types.d.ts CHANGED
@@ -49,6 +49,7 @@ interface CommandLineArgs {
49
49
  verbose?: boolean;
50
50
  filter?: string[];
51
51
  concurrency?: number;
52
+ debug?: boolean;
52
53
  }
53
54
 
54
55
  interface ReportCommandArgs {