Closed josephniet closed 3 months ago
Hey mate, we have just merged a bit of an overhaul to how we build and manage package entry points (https://github.com/seek-oss/capsize/pull/168)
We have one more thing to merge before cutting the release, but keen to have your feedback on the following snapshot if you have time:
@capsizecss/unpack@0.0.0-master-20240214212615
pretty busy atm but I updated the package & re-run quickly & this is what I get.
When I run via await fromUrl instead I get a different error:
Uncaught ReferenceError: Buffer is not defined onLoadEnd index.js:17 blobToBuffer2 index.js:20 fromBlob index.mjs:75 fromBlob index.mjs:74 fromUrl index.mjs:93 async* main.ts:7
There's always a chance it's just something screwed up on my end...I do spend most of my life bashing away with things I don't understand :)
If you have a repro you can share that'll help. In the mean time we have cut the release now, so any further testing can be against latest published versions.
Closing due to inactivity. Feel free to re-open if you find an issue in the latest version
I'm getting an error when trying to import unpack. Tested using a fresh vite deployment
main.ts `import './style.css' import { fromFile } from '@capsizecss/unpack'; import font from './font.woff2';
const metrics = await fromFile(font); console.log('font metrics', metrics)`
package.json
{ "name": "capsize", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "tsc && vite build", "preview": "vite preview" }, "devDependencies": { "typescript": "^5.2.2", "vite": "^5.1.0" }, "dependencies": { "@capsizecss/unpack": "^1.0.0" } }
Error ` VITE v5.1.1 ready in 194 ms
➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ➜ press h + enter to show help X [ERROR] No matching export in "node_modules/fontkit/dist/browser-module.mjs" for import "default"
PS - Awesome project! I ended up using the GH site to upload fonts & then lift the metrics from there & they worked absolutely perfectly.