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

Migrate to Vue3 #1377

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft

Migrate to Vue3 #1377

wants to merge 21 commits into from

Conversation

pgiraud
Copy link
Member

@pgiraud pgiraud commented Apr 9, 2024

No description provided.

Vue 2 -> 3
Vite 3 -> 5
BootstrapVue 2 -> Next
datatables bs4 -> 2

Currently we only build js for the home page.

Alog the way, we also configure vite/rollup to build chunks for the different
libraries.
Using v-if here generates the following error:
Unhandled error during execution of scheduler flush

This is apparently due to the fact that in some cases the data changes from
'valid data' -> null. Because the sparkline was already rendered, the content
of the 'root' element was changed. In this case, the element where to display
the 'no data' message being nested in the root element destroyed. The problem
is that Vue doesn't know that this element doesn't exist anymore and tries to
display it again.
Before:
../dist/highlight.js-uQ0yV3gg.js         898.05 kB │ gzip: 297.18 kB

After:
../dist/highlight.js-D4mrhrWl.js          20.76 kB │ gzip:  8.27 kB
Vuedraggable is not compatible with Vue3. We get rid of it for now and will
find an alternative later on.

Changes were made to DateRangePicker to prevent weird behavior. We now rely on
router.isReady or router.afterEach instead of unreliable usage of watch.
Instead of using built css and js files.
Instead of using the built css and js files.
The main idea is to import DataTable instead of relying on an already built
library.

Selector for the search filter input needs to be adapted due to internal
changes in datatables DOM structure.

We also change some var to const along the way.
outDir needs to be changed in vite config because otherwise file changes are
not detected and HMR cannot work properly.
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.

None yet

1 participant