import HASH slash styles
import '#/styles/globals.css';
Reading the code in https://github.com/vercel/app-playground and they're using a convention
to import from i guess the <root>/styles/globals.css
In the ct3a i noticed in
src/pages/index.tsx
the styles arent even imported...
So i guess three questions
1. Where do they get imported in ct3a?
2. How do you import with a hashtag like that?
and
3. With tailwind does the whole css file get included in the build? or is there a way to configure SWC to only include the classes that are getting used?GitHub
GitHub - vercel/app-playground: https://app-dir.vercel.app/
https://app-dir.vercel.app/. Contribute to vercel/app-playground development by creating an account on GitHub.
6 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
thanks @fredkisss (avec 3 ´S´) !
any ideas on question number 2?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Really nice to have that, thanks @fredkisss (avec 3 ´S´)
These alias paths are set with "baseUrl" and "paths" in tsconfig
You can choose whatever you like, but "#" is kind of standard,. I believe because in vanilla node (defining it in package.json with "imports" instead of tsconfig.json with "paths") its the only allowed choice
I used src because i felt that was completely self explanitory
thank you @andersgee