Bom dia Renato, ótimo post parabéns, só não consegui fazer funcionar o plugin babel-plugin-root-import, sabe se ele funciona com typescript? eu fiz as configs no arquivo babelrc e eslintrc e ele acha as pastas porem quandodo coloco o nome da imagem(image.svg ou image.png) ele fica dando erro...
module "*.png"
Unable to resolve path to module '~/assets/png/1.icone.png'
se eu coloco o caminho relativo comum('../assets/png/1.icone.png') funciona....sabe o q pode ser?
To that with React.JS we need use: customize-cra and react-app-rewired. I already did it, but I not wrote a post about it. So I found this article that could help you whit it.
Bom dia Renato, ótimo post parabéns, só não consegui fazer funcionar o plugin babel-plugin-root-import, sabe se ele funciona com typescript? eu fiz as configs no arquivo babelrc e eslintrc e ele acha as pastas porem quandodo coloco o nome da imagem(image.svg ou image.png) ele fica dando erro...
module "*.png"
Unable to resolve path to module '~/assets/png/1.icone.png'
se eu coloco o caminho relativo comum('../assets/png/1.icone.png') funciona....sabe o q pode ser?
Hi Erik, tanks by comments!
To that with React.JS we need use: customize-cra and react-app-rewired. I already did it, but I not wrote a post about it. So I found this article that could help you whit it.
This is my repo with this config.
In TypeScript I believe we config the tsconfig.json with:
Obs: My repo and the article not use TypeScript.
Best regard