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 react-scripts to vite #695

Open
1 of 2 tasks
mfechner opened this issue Oct 14, 2024 · 0 comments · May be fixed by #696
Open
1 of 2 tasks

Migrate react-scripts to vite #695

mfechner opened this issue Oct 14, 2024 · 0 comments · May be fixed by #696
Labels
a:feature New feature or request in:ui

Comments

@mfechner
Copy link

mfechner commented Oct 14, 2024

Is your feature request related to a problem? Please describe.
The current build tools of the UI are very outdated and are making problem with newer versions of nodejs.
Related issue: #574

Describe the solution you'd like
I work on a patch to migrate from react-scripts to vite which includes other required changes (I had also to update state management lib mobx).

Describe alternatives you've considered
Update react-scripts is not really an option, as vite is the currently mostly used platform to build and develop with react and also with other frameworks. This would only move the migration to vite to a later date.

Additional context
This request was initiated by a discussion here:
#199 (comment)

The current version can be found here, it is WIP:
https://github.com/mfechner/gotify-server/tree/react_scripts_to_vite

If I see a bug free version, I will submit a PR it.

I see there some last problems, but I have difficulties to spot the location in code, maybe someone has an idea.

  • The file asset-manifest.json is not generated
  • Some mobx message that observables are modified without having an action attached to it

For the asset-manifest.json, you can just touch the file to get the gotify go binary up and running:
touch ui/build/asset-manifest.json

Error message in browser console for the UI state management:

[MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: [email protected] [<anonymous code>:1:145535](chrome://devtools/content/webconsole/%3Canonymous%20code%3E)
[MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ObservableArray@17 [<anonymous code>:1:145535](chrome://devtools/content/webconsole/%3Canonymous%20code%3E)
[MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: [email protected] [<anonymous code>:1:145535](chrome://devtools/content/webconsole/%3Canonymous%20code%3E)
[MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: [email protected]
@mfechner mfechner added the a:feature New feature or request label Oct 14, 2024
This was referenced Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature New feature or request in:ui
Development

Successfully merging a pull request may close this issue.

2 participants