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

fix(webpack): set publicPath to / in dev mode #1415

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented Sep 19, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Related to #1175
Related to #1284

Description of the change:

Set the publicPath in webpack.dev to /, which configures the web assets path to /<asset-path> when using with hot-reload server.

This way, directly accessing sub-path such as /rules/create should work. It makes workflow easier when we are working on sub views (i.e. create rules, recordings, etc).

How to test

  1. Start dev-server with yarn start:dev or yarn start:dev:preview.
  2. Access the sub view, for example, /rules/create directly by entering the URL.
  3. The view should load correctly.
  4. Make some changes to those sub-view and verify that the sub view is reloaded correctly.

@tthvo tthvo requested a review from a team September 19, 2024 22:16
@github-actions github-actions bot added the needs-triage Needs thorough attention from code reviewers label Sep 19, 2024
@tthvo tthvo removed the needs-triage Needs thorough attention from code reviewers label Sep 20, 2024
@andrewazores andrewazores merged commit 6aa3d35 into cryostatio:main Sep 20, 2024
28 of 29 checks passed
@tthvo tthvo deleted the dev-public-path branch September 20, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants