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

build: add vite support #559

Merged
merged 14 commits into from
May 3, 2024
Merged

build: add vite support #559

merged 14 commits into from
May 3, 2024

Conversation

ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented May 1, 2024

Trying to keep the webpack build intact for now, while trying to get a working build with vite.

TODO

  • Fix broken icons in webpack build
  • Fix tests
    • Still broken locally, but passes in CI
  • Ensure CSP is correct

If we are done with the above, we can merge and continue the following in a new PR:

@ErikBjare ErikBjare force-pushed the dev/migrate-to-vite branch from 7109abc to 36855f0 Compare May 1, 2024 14:05
@@ -13,6 +13,6 @@
<strong>We're sorry but the ActivityWatch Web UI doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="module" src="/src/main.js"></script>
Copy link
Member Author

Choose a reason for hiding this comment

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

Thought this would mess up the webpack build... But seems to work.

Copy link

codecov bot commented May 2, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 25.60%. Comparing base (fb78b78) to head (9602ad1).

❗ Current head 9602ad1 differs from pull request most recent head 134aa22. Consider uploading reports for the commit 134aa22 to get more accurate results

Files Patch % Lines
src/main.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #559      +/-   ##
==========================================
+ Coverage   25.55%   25.60%   +0.04%     
==========================================
  Files          27       27              
  Lines        1616     1613       -3     
  Branches      273      273              
==========================================
  Hits          413      413              
+ Misses       1177     1174       -3     
  Partials       26       26              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

themeLink.href = '/dark.css'; // darkCssUrl
themeLink.rel = 'stylesheet';
// Append Dark Theme Element If Selected Mode Is Dark
theme === 'dark' ? document.querySelector('head').appendChild(themeLink) : '';

Check warning

Code scanning / CodeQL

Expression has no effect Warning

This expression has no effect.
@ErikBjare ErikBjare marked this pull request as ready for review May 3, 2024 19:16
Copy link
Member Author

@ErikBjare ErikBjare left a comment

Choose a reason for hiding this comment

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

LGTM!

@ErikBjare ErikBjare changed the title build: started migrating webpack to vite build: add vite support May 3, 2024
@ErikBjare ErikBjare merged commit 3a3559c into master May 3, 2024
8 checks passed
@ErikBjare ErikBjare deleted the dev/migrate-to-vite branch May 3, 2024 19:29
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

Successfully merging this pull request may close these issues.

1 participant