molefrog / wouter

🥢 A minimalist-friendly ~2.1KB routing for React and Preact
https://npm.im/wouter
The Unlicense
6.65k stars 152 forks source link

Ship `regexparam` with optional wildcards #375

Closed molefrog closed 11 months ago

molefrog commented 11 months ago

Adds src/regexparam.js which was extracted from https://github.com/lukeed/regexparam It is a temporary fix until https://github.com/lukeed/regexparam/pull/25 is shipped

codesandbox[bot] commented 11 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

github-actions[bot] commented 11 months ago

size-limit report 📦

Path Size
packages/wouter/esm/index.js 2.07 KB (+0.19% 🔺)
packages/wouter/esm/use-browser-location.js 693 B (0%)
packages/wouter/esm/memory-location.js 836 B (0%)
packages/wouter/esm/use-hash-location.js 709 B (0%)
packages/wouter-preact/esm/index.js 1.95 KB (+0.51% 🔺)
packages/wouter-preact/esm/use-browser-location.js 590 B (0%)
packages/wouter-preact/esm/use-hash-location.js 590 B (0%)
packages/wouter-preact/esm/memory-location.js 703 B (0%)
molefrog commented 11 months ago

@jeetiss I've decided not to create a workspace package, since it makes it harder to maintain builds and ship types. The code itself is 30 LOC, so I guess it is fine for the time being. I really hope that eventually it lands there, so we could remove the fix.