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

Migration of frontend tooling to Vite 4 #2645

Merged
merged 12 commits into from
Aug 26, 2023
Merged

Conversation

kloon15
Copy link
Contributor

@kloon15 kloon15 commented Aug 12, 2023

Description
This PR replaces the old build system with Vite 4, as a first step of #2623

🚨 Before submitting your PR, please read community, and indicate which issues (in any of the repos) are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.

  • DO make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • DO make sure you are making a pull request against the master branch (left side). Also you should start your branch off our master.
  • DO make sure that File Browser can be successfully built. See builds and development.
  • DO make sure that related issues are opened in other repositories. I.e., the frontend, caddy plugins or the web page need to be updated accordingly.
  • AVOID breaking the continuous integration build.

Further comments
Running it on my homeserver, currently everything seems to be working as before.

@kloon15 kloon15 requested a review from o1egl as a code owner August 12, 2023 17:10
kloon15 and others added 8 commits August 13, 2023 15:06
The point is to not have to rebuild every time to test a change, but make use of Vite's HMR and other goodies.
Some things are not yet working in dev mode:
- Upload is stuck and fails
- Reloading page while on a file will give 404 error
- Prob more that i didnt catch
@o1egl o1egl merged commit 8838a09 into filebrowser:master Aug 26, 2023
7 of 8 checks passed
@ArthurMousatov
Copy link
Contributor

I know this is closed, but I'm getting an error after this VITE PR:
image

This is after running "go run . --port 9000 --root ./demo_files/ --address 192.168.2.92"
I have run npm run watch on a separate terminal, and I seem to have a dist/public file afterwards:

image

Am I doing something wrong?

@kloon15 kloon15 deleted the vite-4 branch August 26, 2023 19:28
@kloon15
Copy link
Contributor Author

kloon15 commented Aug 26, 2023

As a part of improving the frontend development cycle without having to rebuild the js code, ur now expected to run a vite dev server alongside go and access the site from there:
npm run dev will start the vite dev server.
It will proxy api requests to localhost on port 8080.

@ArthurMousatov
Copy link
Contributor

As a part of improving the frontend development cycle without having to rebuild the js code, ur now expected to run a vite dev server alongside go and access the site from there: npm run dev will start the vite dev server. It will proxy api requests to localhost on port 8080.

Awesome, that works. Thanks!

langren1353 pushed a commit to langren1353/filebrowser-player that referenced this pull request Oct 18, 2023
---------

Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
(cherry picked from commit 8838a09)
langren1353 pushed a commit to langren1353/filebrowser-player that referenced this pull request Oct 18, 2023
---------

Co-authored-by: Oleg Lobanov <oleg@lobanov.me>

(cherry picked from commit 8838a09)
langren1353 pushed a commit to langren1353/filebrowser-player that referenced this pull request Oct 18, 2023
---------

Co-authored-by: Oleg Lobanov <oleg@lobanov.me>

(cherry picked from commit 8838a09)
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

3 participants