Problem
1. vite.config.ts has no source map configuration for the library build — consumers who debug the library in their devtools see minified code with no source maps. Adding build.sourcemap: true would make library debugging significantly easier.
2. vite.config.ts has no optimizeDeps configuration — sorokit-core and @creit.tech/stellar-wallets-kit are large ESM packages that Vite pre-bundles every cold start. Explicitly listing them in optimizeDeps.include reduces cold-start time in consumer projects.
3. vite.config.ts does not set build.minify to false for the library build — minification of a library makes debugging harder and increases the chance of variable name collisions in consumers' bundles. Library builds should prefer minify: false (or "esbuild" with keepNames: true).
Solution
- Add
build.sourcemap: true to the library config.
- Add
optimizeDeps: { include: ["sorokit-core", "@creit.tech/stellar-wallets-kit"] }.
- Set
build.minify: false for the library output format.
Acceptance Criteria
Note for Contributors: Write a clear PR description. Show the dist/ directory listing with source maps and confirm the output is readable.
Problem
1.
vite.config.tshas no source map configuration for the library build — consumers who debug the library in their devtools see minified code with no source maps. Addingbuild.sourcemap: truewould make library debugging significantly easier.2.
vite.config.tshas nooptimizeDepsconfiguration —sorokit-coreand@creit.tech/stellar-wallets-kitare large ESM packages that Vite pre-bundles every cold start. Explicitly listing them inoptimizeDeps.includereduces cold-start time in consumer projects.3.
vite.config.tsdoes not setbuild.minifytofalsefor the library build — minification of a library makes debugging harder and increases the chance of variable name collisions in consumers' bundles. Library builds should preferminify: false(or"esbuild"withkeepNames: true).Solution
build.sourcemap: trueto the library config.optimizeDeps: { include: ["sorokit-core", "@creit.tech/stellar-wallets-kit"] }.build.minify: falsefor the library output format.Acceptance Criteria
dist/sorokit-ui.es.js.mapis generated afternpm run buildsorokit-corewithout errorsnpm run buildpasses