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

Switch from vue-cli to vite #1026

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Switch from vue-cli to vite #1026

wants to merge 2 commits into from

Conversation

BenjaminCharmes
Copy link
Contributor

@BenjaminCharmes BenjaminCharmes commented Dec 2, 2024

Closes #1005

First attempt to switch from vue-cli to vite and a few things to discuss:

  • I had to use cryptojs instead of crypto (MD5(value).toString(); instead of crypto.createHash("md5").update(value).digest("hex");)

  • I had to use import.meta.env.BASE_URL instead of process.env.BASE_URL

  • I remove .browserslistrc and babel.config.js, not useful with vite ?

  • vite 6.x.x not supported by cypress ? (warning message)

  • In vite.config.js, I use extensions: [".vue", ".js", ".json"] to not rename all the imports in all the files, but it could be better to take the time to do it ? (e.g. import Navbar from "@/components/Navbar"; to import Navbar from "@/components/Navbar.vue";

  • Had to rename env variables from VUE_ to VITE_ to make it work without having to import all of them. Should we keep it that way (and also rename them where ever it's needed, e.g. github?) or just import them in the vite.config.js ?

To do:

  • Rewrite the scripts in package.json ?
  • Need to fix Bokeh.
    Just need to downgrade to Bokeh 2.4.0
  • import "tinymce/plugins/hr"; not working
    Downgrade tinymce to v5
  • Fix docker -> Fix cypress e2e test in github workflow

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.04%. Comparing base (7e63cdd) to head (a110fb6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1026   +/-   ##
=======================================
  Coverage   70.04%   70.04%           
=======================================
  Files          62       62           
  Lines        3996     3996           
=======================================
  Hits         2799     2799           
  Misses       1197     1197           

@BenjaminCharmes BenjaminCharmes added enhancement New feature or request webapp For issues/PRs pertaining to the web interface labels Dec 2, 2024
@BenjaminCharmes BenjaminCharmes added the build For issues/PRs pertaining to the build or deployment of the package label Dec 10, 2024
@BenjaminCharmes BenjaminCharmes force-pushed the bc/switch-to-vite branch 2 times, most recently from da60bee to 5a7a0d7 Compare December 16, 2024 10:44
First attempt to switch from vue-cli to vite

Remove a 'process' that I missed

Fix a few thing to make vite work

Fix a few thing to make vite work

Fix a few thing to make vite work

Downgrade Bokeh to 2.4.0

Downgrade tinymce to v5

Temp commit

Update yarn build with vite

Update yarn build with vite

Update yarn build with vite

Update yarn build with vite

Update docker build for vite

Add serve into package.json

Update env variable fron VUE_ to VITE_
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Comments for myself:

  • check docker build version info with vite
  • think about migrating env vars too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build For issues/PRs pertaining to the build or deployment of the package enhancement New feature or request webapp For issues/PRs pertaining to the web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch our webapp build tool from vue-cli to vite
2 participants