Skip to content

Commit

Permalink
chore: fix client analyze error
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Jan 15, 2025
1 parent 3c8de48 commit 99e7b5a
Show file tree
Hide file tree
Showing 24 changed files with 2,939 additions and 3,073 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default defineConfig({
| `gzipOptions` | `Record<string,any>` | `{}` | Compression options. (Details see `zlib module`) |
| `analyzerPort` | `number\|'auto'` | `8888` | static server port. |
| `openAnalyzer` | `boolean` | `true` | Open the static website. (Only works on `analyzerMode` is `server` or `static` ) |
| `defaultSizes` | `stat\|parsed\|gzip` | `stat` | The default type selected in the client page |
| `defaultSizes` | `stat\|parsed\|gzip\brotil` | `stat` | The default type selected in the client page |
| `summary` | `boolean` | `true` | Show full chunk info to stdout. |

## ClI
Expand Down
13 changes: 6 additions & 7 deletions analyze.config.mts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { defineConfig, mergeConfig } from 'vite'
import conf from './src/client/vite.config.mts'
import { analyzer } from './src/server'

// Use mergeConfig seems bug.

const c = conf({ command: 'build', mode: 'production' })
export default mergeConfig(
c,
defineConfig({
plugins: [...c.plugins!, analyzer({ analyzerMode: 'json' })]
})
)

c.plugins?.push(analyzer({ analyzerMode: 'json' }))

export default c
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-esm-shim": "^0.1.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@stylex-extend/core": "^0.5.4",
"@stylex-extend/react": "^0.5.4",
"@stylex-extend/vite": "^0.5.4",
"@stylex-extend/core": "^0.6.0",
"@stylex-extend/react": "^0.6.0",
"@stylex-extend/vite": "^0.6.0",
"@stylexjs/stylex": "^0.9.1",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
Expand Down
Loading

0 comments on commit 99e7b5a

Please sign in to comment.