New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ESM #99
Comments
i've published a package called fontmin-esm as a work around with this this branch for ESM support: #96 |
how to use fontmin-esm, I have a error when use |
@VFVrPQ for using: npm i @sctg/fontminify import Fontmin from '@sctg/fontminify';
const fontminify = new Fontmin()
.src('*.ttf')
.dest('./fonts');
fontminify.run(function (err, files) {
if (err) {
throw err;
}
console.log(files[0]);
// => { contents: <Buffer 00 01 00 ...> }
}); or in Typescript® import Fontminify from '@sctg/fontminify';
import type {FontminifyFile} from '@sctg/fontminify';
const fontminify = new Fontminify()
.src('*.ttf')
.dest('./fonts');
fontminify.run(function (err:Error, files:FontminifyFile[]) {
if (err) {
throw err;
}
console.log(files[0]);
// => { contents: <Buffer 00 01 00 ...> }
}); CLI is full of bug with options… |
@eltorio I got a error when I use @sctg/fontminify. |
Do you have any plans to support ESM? It will be very helpful for vite developers
The text was updated successfully, but these errors were encountered: