weird I copy this exactly and the paths didn't work
the error:Module not found: Can't resolve '@models/tests' in '/Users/talorlanczyk/Projects/react-tests/my-app/src'
I would like you to show me the code on react please
Thanks,
But when i say you can't meant that you must do an additional step like eject to do this or use third party library
I think add this to your article will great for a lot of developers
Its great but unfortunately react by itse will ignore paths
I think it works with React as well. Tried it in a Next.js project though
For react you need third party library
I tested it right now, it's working with plain old react
weird I copy this exactly and the paths didn't work
the error:Module not found: Can't resolve '@models/tests' in '/Users/talorlanczyk/Projects/react-tests/my-app/src'
I would like you to show me the code on react please
Add the following in
webpack.config.js
:Use
yarn eject
first if you are usingcreate-react-app
Thanks,
But when i say you can't meant that you must do an additional step like eject to do this or use third party library
I think add this to your article will great for a lot of developers
I read somewhere it only doesnβt work for create-react-app, did you test it on CRA?
Since this is quite a useful trick, even though it doesn't work directly, there is a work around for it