epicweb-dev / epic-stack

This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea.
https://www.epicweb.dev/epic-stack
MIT License
4.63k stars 376 forks source link

Suggestion: change absolute import paths to @/ #524

Closed ricardasjak closed 11 months ago

ricardasjak commented 11 months ago

Hello, I am very new to Remix stack, so don't take my suggestion too seriously. However, I ran into various problems using WebStorm IDE. I was unable to auto fix missing imports with WebStorm:

  1. my IDE suggested me to import things from #node_modules/... instead of '@remix-run/node' (same with other libs)
  2. Wrong component import, e.g. import { StatusButton } from '@/app/components/ui/status-button.js' js(!) instead of ...tsx

I have solved my issues when I converted absolute path imports to Nextjs convention with @/ (I bet WS has better compatibility with Nextjs conventions, rather than # thingie). I also had to import special library to share tsconfig with vitest, so I could remove imports section in package.json.

Here are main changes:

image image image image

Pardon me, I am not opening PR with following improvements, I don't think I have enough experience to understand how this project is evolving.

kentcdodds commented 11 months ago

Thanks for sharing. We're very intentional about this import config. Hopefully someone can find out a good way to handle this standard with Webstorm.

I don't plan on making a change here, so we'll close this.