Skip to content

Custom thumbnail for CRA 4 #160

Answered by igordanchenko
EMCarlos asked this question in Q&A
Discussion options

You must be logged in to vote

Is there another way that doesn't involve craco? Sorry, but I'm trying not to add another library to solve this

  1. Migrating off CRA (react-scripts) is the best long-term investment since CRA is barely maintained by Meta. Vite is an amazing alternative.

  2. Upgrading to CRA 5 (because CRA 4 is severely outdated) would solve all of your TS errors as you'd no longer need to hack the subpath module imports.

  3. Craco is the best workaround if you must stay on CRA 4. It's a trivial price to pay if you must continue using outdated toolchain.

  4. The following import seems to trick TypeScript into importing the correct plugin path and applying the intended module augmentation.

import type Thumbnai…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@EMCarlos
Comment options

@igordanchenko
Comment options

Answer selected by EMCarlos
@EMCarlos
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants