import HASH slash styles

import '#/styles/globals.css'; Reading the code in https://github.com/vercel/app-playground and they're using a convention
import '#/styles/globals.css';
import '#/styles/globals.css';
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
https://app-dir.vercel.app/. Contribute to vercel/app-playground development by creating an account on GitHub.
6 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
fotoflo
fotofloOP3y ago
thanks @fredkisss (avec 3 ´S´) ! any ideas on question number 2?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
fotoflo
fotofloOP3y ago
Really nice to have that, thanks @fredkisss (avec 3 ´S´)
andersgee
andersgee3y ago
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
fotoflo
fotofloOP3y ago
I used src because i felt that was completely self explanitory thank you @andersgee
Want results from more Discord servers?
Add your server