Skip to content
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

PrimeVue with Vite 5: Missing common CSS Styles #5249

Closed
cuberinooo opened this issue Feb 9, 2024 · 7 comments
Closed

PrimeVue with Vite 5: Missing common CSS Styles #5249

cuberinooo opened this issue Feb 9, 2024 · 7 comments

Comments

@cuberinooo
Copy link

cuberinooo commented Feb 9, 2024

Describe the bug

Im using the latest PrimeVue Version 3.48.0 and I just upgraded Vite from 4 to 5. After migration the common styles of each primevue components are not loaded anymore. I saw that they have some breaking changes: See https://vitejs.dev/guide/migration.html.

E.g. On the screenshot you can see some styles of the multiselect component which are not loaded anymore when I upgrade vite to 5.
Screenshot from 2024-02-09 09-15-18

Btw. I use Prestige Template and all styles of the template are loaded properly. These are included on the main.ts file.

Has anybody faced the same issue? Is there are workaround to fix this ? Im not even sure if this problem is related to primevue. Since only the upgrade from vite changes the behaviour. But I want to make sure if I have to change the import of the styles. Since Primevue did also some changes on styles. E.g. the primevue.min.css got removed and also they added @layer.
(See #4647 or: #4110)

Maybe that`s useful to know:
I use TS and everything is configured to ESM. We did not import a theme. As I said only the prestige template were used and imported to main.ts and the other styles were coming directly from primevue components.

Reproducer

PrimeVue version

3.48.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Upgrade to vite 5 from 4 and see that the common styles of each primevue components are not loaded anymore.

Expected behavior

Common Styles of each primevue component should loaded

@cuberinooo cuberinooo added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 9, 2024
@cuberinooo cuberinooo changed the title PriemVue with Vite 5: Missing common Css Styles PriemVue with Vite 5: Missing common CSS Styles Feb 9, 2024
@cuberinooo cuberinooo changed the title PriemVue with Vite 5: Missing common CSS Styles PrimeVue with Vite 5: Missing common CSS Styles Feb 9, 2024
@mertsincan
Copy link
Member

Interesting! We'll check and get back to you. I set a milestone for it.

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 9, 2024
@mertsincan mertsincan added this to the 3.50.0 milestone Feb 9, 2024
@marknn3
Copy link

marknn3 commented Feb 11, 2024

I wanted to create a new issue, but it looks like this issue is related/similar:
Since PrimeVue 3.48.0 styles are missing in the html head. This seems unrelated to vite4->5 migration as stated by the OP.
With PrimeVue v3.47.2:
2024-02-11 22_34_16-PrimeVue missing styles since 3 48 0-1
With PrimeVue v3.48.0 (No other changes):
2024-02-11 22_33_21-PrimeVue missing styles since 3 48 0-2

Minimum source to reproduce the issue:
primevue-style-issue-3.48.0.zip

@marknn3
Copy link

marknn3 commented Feb 11, 2024

Found the issue!
Since PrimeVue 3.48.0 styles are being moved to theme files (#5214). This does require an update of the theme files bundled with existing projects.
This is technically a breaking change, because is does require a manual copy of the theme file(s) after this PrimeVue version upgrade.

@cuberinooo
Copy link
Author

@marknn3 nice on finding that. Ye, that is definitly a breaking change ! My fix for this was exactly taking one of the themes. Problem here was that it changed some styles which I had to change it manually. There should be a "default" theme like the one that we allready had.

@eneeio-nm
Copy link
Contributor

I too am surprised that this change wasn't flagged as a major release. It's going to take a couple of additional days dev time to upgrade our web platform to utilise the latest PrimeVue release (3.48.x).

@eneeio-nm
Copy link
Contributor

I wanted to create a new issue, but it looks like this issue is related/similar: Since PrimeVue 3.48.0 styles are missing in the html head. This seems unrelated to vite4->5 migration as stated by the OP.

I agree - this doesn't have anything to do with upgrade Vite from 4 to 5.

@tugcekucukoglu
Copy link
Member

For more information please check #5214

@tugcekucukoglu tugcekucukoglu removed this from the 3.50.0 milestone Mar 14, 2024
@tugcekucukoglu tugcekucukoglu removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants