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

fix: use rollup-plugin-postcss-lit with Vite #14295

Merged
merged 4 commits into from
Aug 9, 2022
Merged

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Aug 8, 2022

Description

Fixes #14142

Added rollup-plugin-postcss-lit and configured it to handle all CSS files except those under theme folder.
Note the extra entry with ? is necessary until umbopepato/rollup-plugin-postcss-lit#49 fixed.

Another entry added to excludes to workaround umbopepato/rollup-plugin-postcss-lit#52

Type of change

  • Bugfix

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

Unit Test Results

   916 files  +  9     916 suites  +9   50m 54s ⏱️ + 4m 4s
6 010 tests +11  5 956 ✔️ +11  54 💤 ±0  0 ±0 
6 221 runs   -   2  6 159 ✔️  -   1  62 💤  - 1  0 ±0 

Results for commit b7be221. ± Comparison against base commit 1bf5831.

♻️ This comment has been updated with latest results.

@mshabarov
Copy link
Contributor

Tested with both flow-tests/test-themes and flow-tests/test-custom-frontend-directory/test-themes-custom-frontend-directory manually, works as expected: text field styles are taken from custom theme and lit component styles are takes from component CSS file.

mshabarov
mshabarov previously approved these changes Aug 9, 2022
@web-padawan web-padawan marked this pull request as ready for review August 9, 2022 11:15
Copy link
Member Author

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two tests still failing:

Error:  Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.844 s <<< FAILURE! - in com.vaadin.flow.uitest.ui.theme.ReusableThemeIT
Error:  applicationTheme_GlobalCss_isUsed[ANY_Chrome_](com.vaadin.flow.uitest.ui.theme.ReusableThemeIT)  Time elapsed: 0.844 s  <<< FAILURE!
Error:  Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.791 s <<< FAILURE! - in com.vaadin.flow.webcomponent.ApplicationThemeComponentIT
Error:  applicationTheme_GlobalCss_isUsedOnlyInEmbeddeComponent[ANY_Chrome_](com.vaadin.flow.webcomponent.ApplicationThemeComponentIT)  Time elapsed: 0.791 s  <<< FAILURE!

@web-padawan
Copy link
Member Author

@mshabarov Updated the PR to also add themeResourceFolder to exclude, this should fix remaining tests.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mshabarov mshabarov merged commit fccffb2 into master Aug 9, 2022
@mshabarov mshabarov deleted the fix/vite-import-css-ts branch August 9, 2022 12:53
@vaadin-bot
Copy link
Collaborator

Hi @web-padawan and @mshabarov, when i performed cherry-pick to this commit to 23.1, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick fccffb2
error: could not apply fccffb2... fix: use rollup-plugin-postcss-lit with Vite (#14295)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.2.0.beta1 and is also targeting the upcoming stable 23.2.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing styles in lit webcomponent fails with Vite
3 participants