-
-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix/tw-classnames-output-#627 #654
Conversation
d90d27b
to
5c52da6
Compare
My solution was a beginner solution, thanks for fixing it like an expert. |
Thanks, but i don't feel like an expert. You've found that issue, which we're not aware, that's also very helpful 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
"build:tailwindcss": "tailwindcss -i src/tailwind-input.css -o src/tailwind-output.css", | ||
"build": "pnpm run clean && pnpm type-check && pnpm build:tailwindcss && vite build", | ||
"build:watch": "cross-env __DEV__=true vite build --mode development & pnpm build:tailwindcss -- --watch", | ||
"build:tailwindcss": "pnpm dlx tailwindcss -i ./src/tailwind-input.css -o ./dist/tailwind-output.css -m", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![스크린샷 2024-08-14 오후 8 45 29](https://private-user-images.githubusercontent.com/53500778/357799658-765dd772-9d09-4d75-a2c5-1faf97c19c42.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTQzNjIsIm5iZiI6MTczOTU1NDA2MiwicGF0aCI6Ii81MzUwMDc3OC8zNTc3OTk2NTgtNzY1ZGQ3NzItOWQwOS00ZDc1LWEyYzUtMWZhZjk3YzE5YzQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE3Mjc0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg3M2E5MDE0NjBmNjA2ZWIwNTZkODY0OGI2ZjJhOWQ4ZDU5NWMwMzRiNjkxZTUxM2U4ZWNjM2IwMzhiYzcwNDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.tFoc1sIu5fle4yd3vaYe8hoUf5lqqvbZVKP2b7rY52A)
I saw above error message. How about moving it inside src
, the original file's location, instead of the dist
folder?
Is there a reason you moved the output file to dist?
"build:tailwindcss": "pnpm dlx tailwindcss -i ./src/tailwind-input.css -o ./dist/tailwind-output.css -m", | |
"build:tailwindcss": "pnpm dlx tailwindcss -i ./src/tailwind-input.css -o ./src/tailwind-output.css -m", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jonghakseo I want to separate output file from src, and there's entire /dist ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the PR above, It seems like a good idea to exclude from VSC for output files.
How about moving it inside src and out of vsc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jonghakseo What do you mean about 'out of vsc'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That bug occur probably because of the lack of &
In build-watch
script:
development & pnpm build:tailwindcss
Not it's done by concurrently
And i check it a minute ago on VSC, and works perfect, postinstall
isn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jonghakseo Yeah, that's reproducible, i need to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jonghakseo Ok, I added a tw prebuild before, postinstall
can't solve that issue, but this kind of prebuild did it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna check it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HMR was not working. so i fixed it.
// @ts-ignore | ||
import tailwindcssOutput from '@src/tailwind-output.css?inline'; | ||
// @ts-expect-error That's because output file is create during build | ||
import tailwindcssOutput from '../dist/tailwind-output.css?inline'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import tailwindcssOutput from '../dist/tailwind-output.css?inline'; | |
import tailwindcssOutput from '@src/tailwind-output.css?inline'; |
This is related to the comment above.
5c52da6
to
7928ee4
Compare
@PatrykKuniczak any progress here? cause this is very important. |
We're waiting for @Jonghakseo review |
@codergigachad OO maybe he done review, before my message, i'm on mobile then and don't see all messages :) I will take a look to merge it today. |
Tailwind build was not working in content-ui during hmr due to syntax error.
7928ee4
to
9091b12
Compare
@Jonghakseo I belived i had to check, because i was thinking if this env will be resolved properly. Good to you, thank for the second check ❤️ |
Priority*
Purpose of the PR*
I can't open PR to fork, that's why i created this PR.
This is related to #627.
I fixed that fix :)
Solution from #627 wasn't good enough because of the never ending build and it's still don't work properly.
Changes*
I added
concurrently
for run both watch scripts on the same time, now it was running independly.Without that, only first script works.
If i placed vite first then tailwind output file wasn't regenerated.
Else Vite don't run and HMR don't refresh page.
I added also
-m
flag, for minify output file.And i added
dist
folder insidecontent-ui
How to check the feature
Edit files from
content-ui
page.