mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
Following the shared-icons fix (d5cabed14), audit every workspace
package's src/index.ts for top-level side effects and flag the
ones that are safe to tree-shake:
- Pure TS re-export barrels (types, theme, utils, llm, storage):
"sideEffects": false — lets Vite prune entire submodules when a
consumer only imports a subset of named exports. Matters most for
shared-llm where the orchestrator/BYOK branch isn't needed on
every route.
- Packages that ship .svelte components (branding, ui, links):
"sideEffects": ["**/*.svelte", "**/*.css"] — same tree-shaking
benefit for TS modules, but keeps Svelte component CSS injection
intact.
The state-holding submodules (shared-ui drag-state/toast,
shared-llm store, shared-links mutations) are still evaluated
whenever their exports are referenced, so behaviour is unchanged —
the flag only lets the bundler skip modules that aren't in the
dependency graph at all.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
769 B
JSON
36 lines
769 B
JSON
{
|
|
"name": "@mana/shared-storage",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"sideEffects": false,
|
|
"description": "S3-compatible object storage client for Mana monorepo (MinIO)",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"type-check": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"clean": "rm -rf dist",
|
|
"lint": "eslint ."
|
|
},
|
|
"dependencies": {
|
|
"@aws-sdk/client-s3": "^3.700.0",
|
|
"@aws-sdk/lib-storage": "^3.700.0",
|
|
"@aws-sdk/s3-request-presigner": "^3.700.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.10.1",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.1.2"
|
|
}
|
|
}
|