Skip to content

Commit

Permalink
add chunk name for pnpm - unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
glitch-txs committed Aug 13, 2024
1 parent 854b53c commit 6ba0194
Show file tree
Hide file tree
Showing 4 changed files with 590 additions and 965 deletions.
9 changes: 8 additions & 1 deletion package/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ export async function run(process: NodeJS.Process){
outDir: './dist',
lib,
rollupOptions: {
external
external,
output: {
chunkFileNames: (chunk)=> {
const fileName = chunk.facadeModuleId?.split("@")?.[1]?.replace("+", "-") || chunk.name;

return "assets/" + fileName + ".js"
},
}
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-size",
"version": "0.0.4",
"version": "0.0.5",
"description": "Measure your build bundle size with Vite",
"main": "dist/index.js",
"bin": "dist/bin.js",
Expand Down
10 changes: 5 additions & 5 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": "dist/index.js",
"type": "module",
"scripts": {
"size": "pnpm run build && vite-size --total --externals @wagmi/core @wagmi/connectors viem",
"size": "pnpm run build && vite-size --externals @wagmi/core @wagmi/connectors viem",
"build": "rm -rf dist && npx tsc",
"watch": "npx tsc --watch"
},
"dependencies": {
"@wagmi/connectors": "4.1.26",
"@wagmi/core": "2.6.17",
"@web3modal/wagmi": "4.2.0-cf64cc0f.1",
"viem": "2.9.21",
"@wagmi/connectors": "5.1.5",
"@wagmi/core": "2.13.4",
"@web3modal/wagmi": "5.0.11",
"viem": "2.19.4",
"vite-size": "workspace:^"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 6ba0194

Please sign in to comment.