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
how to setup loader - No loader is configured for ".ttf" #459
Comments
🎉 This issue has been resolved in version 5.7.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Now I added some default loaders: '.aac': 'file',
'.css': 'file',
'.eot': 'file',
'.flac': 'file',
'.gif': 'file',
'.jpeg': 'file',
'.jpg': 'file',
'.mp3': 'file',
'.mp4': 'file',
'.ogg': 'file',
'.otf': 'file',
'.png': 'file',
'.svg': 'file',
'.ttf': 'file',
'.wav': 'file',
'.webm': 'file',
'.webp': 'file',
'.woff': 'file',
'.woff2': 'file', You can also change it: https://tsup.egoist.sh/#custom-loader |
Thank you very much Kevin! I'll try it 👍🙏🎉🥳🚀❤️ |
Heads up: Who's using tsup in some project: add the interface: fonts.d.ts:
Then you can import files *.ttf like:
|
@egoist The issue is that it doesn't add the I have to do the following but not sure if best way : const FontsMap: Record<string, string> = {
"Branding-Bold": path.resolve("dist", require("./Branding-Bold.ttf")),
}; @tgmarinho any idea too ? |
@ScreamZ I end up using google fonts. I didn't faced this issue. |
has anyone found a fix? |
hi, how can I setup loaders to other files like .ttf using tsup?
The text was updated successfully, but these errors were encountered: