Code Monkey home page Code Monkey logo

Comments (15)

AdrianGonz97 avatar AdrianGonz97 commented on June 7, 2024 2

I think this specific issue is different than what the both of you are experiencing @ollema @knd775 .

OP says their app is no longer using the tailwind css classes, so our webapp is unusable., which tells me that everything is being purged rather than just a couple of TW classes. @adamdva Are you on windows? There was a windows specific bug in vite-plugin-tailwind-purgecss for v0.3.0 that's now been resolved in v0.3.1.

Re: Modals
I've raised an issue in the purge plugin repo where I list the cause, though I haven't come up with a fix yet. You can keep track of it here: AdrianGonz97/vite-plugin-tailwind-purgecss#32

from skeleton.

adamdva avatar adamdva commented on June 7, 2024 2

Hello,
Sorry I didn't see and reply earlier.

  1. No, the missing styles are not limited to modals. The initial +layout.svelte with a Skeleton AppShell has the tailwind CSS working fine. It does have some modal defined in it. Below that the tailwind CSS gets purged. We're using the svelte version of xyflow, and the custome nodes lose all the tailwind styling.
  2. No. My development machine is windows, but I build in a linux docker dev container using VSCode dev container plugin.
  3. My package-lock.yaml shows [email protected]

Hey @adamdva, so we've finally had a couple other users report similar issues on Discord today. After troubleshooting with them, they've confirmed the styles that are missing are limited to those within custom modals.

We're currently gathering information to try to pinpoint the issue:

  1. Were your app's missing styles limited to modals as well?
  2. Are you building the project on a Windows computer
  3. And if you don't mind, just double checking what version of the PurgeCSS plugin with npm ls.

If we stubble upon a solution I'll make sure to share it here as well asap!

from skeleton.

knd775 avatar knd775 commented on June 7, 2024 2

Fixed for us! Thanks!

from skeleton.

adamdva avatar adamdva commented on June 7, 2024 1

@endigo9740 Thank you for you attention and responses.
I have tested rolling back the vite-plugin-tailwind-purgecss to 0.2.1 and experience the same issue with tw-plugin 0.4.0, while tw-plugin 0.3.1 worked fine.
I have PurgeCSS configured as described in the latest docs.
I understand that the turbo/sveltekit/vite/skeleton/tailwind build process is very complex, and something in my setup may be the issue, I just can't find what else is effecting the build.
I can continue to use 0.3.1, and revisit it when tailwind 4 comes out.
thanks again

from skeleton.

endigo9740 avatar endigo9740 commented on June 7, 2024 1

No problem @adamdva, I understand. If by chance you do come across a fix for this please let us know. It may be helpful for other users. Likewise I'll keep and ear to the ground if anyone else reports similar issues - but so far your case does seem isolated.

You can expect some sizable updates to Skeleton in v3 and of course again in the future when Tailwind v4 drops. I'd encourage you to test both, as the former will likely come sooner than the latter!

In the meantime, I'll go ahead and close this issue. But I'm happy to reopen if we can determine a change is needed on our end.

Good luck!

from skeleton.

ollema avatar ollema commented on June 7, 2024 1

just wanted to add that for me, removing the purge css plugin did not seem to work at first. but I forgot to clear the browser cache. when I cleared the browser cache and I disabled the plugin it started to work again!

from skeleton.

endigo9740 avatar endigo9740 commented on June 7, 2024 1

If Adrian is correct the issue for which this thread was created should now be solved, so I'm going to mark this issue closed. Adam, feel free to confirm when you can - Adrian and I will see it.

Per modals - let's move further discussion over the the issue Adrian linked above.

Thanks for help on this one guys!

from skeleton.

AdrianGonz97 avatar AdrianGonz97 commented on June 7, 2024 1

Hey all, I just released vite-plugin-tailwind-purgecss version 0.3.2, a patch that should fix the issues for @knd775 and @ollema. Not quite sure if it'll fix your issue, @adamdva, but please try it out and let us know!

from skeleton.

endigo9740 avatar endigo9740 commented on June 7, 2024

Hey @adamdva I'd be highly suspect of this week's tw-plugin causing the issues as described. We've been busy with Skeleton v3, so the changes for that package were limited to minor cosmetic changes to scrollbar styling. And this was the first update to that package in a few months. You're welcome to scan through the release details to understand what changed. Honestly it was very minor though:

I'd encourage you to review all dependencies that updated in your project and see if you can pinpoint the point of failure. It also be valuable to know what the prior versions of the Skeleton packages you updated from. Especially if you moved from v1.x -> v2.x for the core package, as there would be a migration process for a major release like this.

Doing a full pnpm run build in our turborepo project, and executing via node dist/ is no longer using the tailwing css classes, so our webapp is unusable.

I've never personally used Turborepo, but typically you want to preview a local build using:

pnpm run build
pnpm run preview

But again, your project configuration may differ here.

from skeleton.

adamdva avatar adamdva commented on June 7, 2024

Looking at that change diff for tw-plugin, it doesn't look like it might be effecting the build, however, if I do nothing else besides toggle tw-plugin between 0.3.1 and 0.4.0, the issue is seen.

This does not occur when executing in dev mode, only after a full build and executing from the compiled code with node dist/

Several other packages have been updated in the last few days, so the issue could be in one of them, but is only exposed with the tw-plugin update.

Others that have changed:

  • "@skeletonlabs/skeleton": "2.9.0",
  • "@skeletonlabs/skeleton": "2.9.1",
  • "@sveltejs/vite-plugin-svelte": "^3.0.2",
  • "@sveltejs/vite-plugin-svelte": "^3.1.0",
  • "@types/node": "20.12.5",
  • "@types/node": "20.12.7",
  • "@typescript-eslint/eslint-plugin": "^7.5.0",
  • "@typescript-eslint/parser": "^7.5.0",
  • "@typescript-eslint/eslint-plugin": "^7.6.0",
  • "@typescript-eslint/parser": "^7.6.0",
  • "eslint-plugin-svelte": "^2.36.0",
  • "eslint-plugin-svelte": "^2.37.0",
  • "svelte": "^4.2.12",
  • "svelte": "^4.2.13",
  • "typescript": "^5.4.4",
  • "typescript": "^5.4.5",
  • "vite-plugin-tailwind-purgecss": "0.2.1"
  • "vite-plugin-tailwind-purgecss": "0.3.0"

I suspected it might have something to do with vite-plugin-tailwind-purgecss, which will not be needed in tailwind 4, but even removing it from the vite.config.ts did not help.

I've tried backing out the other updates, and the only thing that resulting in the issue is tw-plugin.
My work-around is to not update the library, so ok for now, and hope it resolves itself with future releases.

from skeleton.

endigo9740 avatar endigo9740 commented on June 7, 2024

@adamdva thanks for expanding with more information.

Just to make sure we're clear, a small cosmetic CSS change in the tw-plugin should never cause the issue you're describing. But I can empathize with how confusing it must be if exchanging that package triggers the issue.

You may be onto something with the PurgeCSS plugin. There was a major update to the plugin this week that should make it much easier to use, but may be a factor here:

You mentioned disabling this did not help, but can you perhaps try reverting the PurgeCSS plugin to 0.2.1 and see if that has an affect? If so I can coordinate with Adrian (the author and fellow Skeleton maintainer) to help troubleshoot your issue.

Perhaps adhering the changes mentioned here will be enough to resolve this for you.

UPDATE:

The new Skeleton doc and CLI changes related to the PurgeCSS update are now live:
https://www.skeleton.dev/docs/purgecss

from skeleton.

endigo9740 avatar endigo9740 commented on June 7, 2024

Hey @adamdva, so we've finally had a couple other users report similar issues on Discord today. After troubleshooting with them, they've confirmed the styles that are missing are limited to those within custom modals.

We're currently gathering information to try to pinpoint the issue:

  1. Were your app's missing styles limited to modals as well?
  2. Are you building the project on a Windows computer
  3. And if you don't mind, just double checking what version of the PurgeCSS plugin with npm ls.

If we stubble upon a solution I'll make sure to share it here as well asap!

from skeleton.

endigo9740 avatar endigo9740 commented on June 7, 2024

@AdrianGonz97 FYI ^^^

from skeleton.

knd775 avatar knd775 commented on June 7, 2024

just wanted to add that for me, removing the purge css plugin did not seem to work at first. but I forgot to clear the browser cache. when I cleared the browser cache and I disabled the plugin it started to work again!

Yep, this was my experience as well. It led me to mistakenly believe it was the tw-plugin's fault.

from skeleton.

endigo9740 avatar endigo9740 commented on June 7, 2024

Thanks for confirming Adam.

@AdrianGonz97 pinging you for visibility.

from skeleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.