how to setup loader - No loader is configured for ".ttf"

See original GitHub issue

hi, how can I setup loaders to other files like .ttf using tsup?

 ✘ tgmarinho@DESKTOP-EOOV6G8  ~/Developer/crow/crow-sdk   develop ±  yarn dev
yarn run v1.22.5
$ tsup --watch
 CLI  Building entry: src/index.ts
 CLI  Using tsconfig: /home/tgmarinho/Developer/crow/crow-sdk/tsconfig.json
 CLI  tsup v5.6.0
 CLI  Using tsup config: /home/tgmarinho/Developer/crow/crow-sdk/tsup.config.ts
 CLI  Running in watch mode
 CLI  Target: node12
 CLI  Cleaning output folder
 CJS  Build start
 > src/components/globalStyle.ts:1:19: error: No loader is configured for ".ttf" files: src/components/fonts/Comforter.ttf
    1 │ import sfWoff from './fonts/Comforter.ttf'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tgmarinhocommented, Mar 7, 2022

@ScreamZ I end up using google fonts. I didn’t faced this issue.

1reaction
egoistcommented, Nov 20, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack TTF loader not loading the fonts - Stack Overflow
1 Answer 1 ; /\.(woff|woff2|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/ · use · loader: ; "file-loader" · options · name: ; "[name].[ext]" · outputPath · "fonts/" ...
Read more >
Problem to asset deploy with esbuild - Elixir Forum
I think the issue is not having set up an esbuild loader to handle the font file-types.
Read more >
Loading Fonts with webpack - Chris Courses
Download the repo, install its dependencies (use yarn or npm install ), and let's get started. Adding File Loader. Without the necessary ...
Read more >
Load images and fonts with Webpack file loader like a pro
Webpack file-loader is a loader used mainly for supporting images such as SVG and PNG, and fonts in your webpack project. If your...
Read more >
Using with webpack - Jest
Non -Babel JavaScript transformations can be handled with Jest's transform config option. Handling Static Assets​. Next, let's configure Jest to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found