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

chore(web,dashboard): remove legacy bundle from dashboard #7474

Merged
merged 6 commits into from
Jan 10, 2025

Conversation

LetItRock
Copy link
Contributor

What changed? Why was the change needed?

Remove the legacy Web app bundle folder from the Dashboard and do the URL redirects instead.

Screenshots

@LetItRock LetItRock self-assigned this Jan 9, 2025
Copy link

linear bot commented Jan 9, 2025

Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit bd523cd
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/67812243cff3d3000821dc8c
😎 Deploy Preview https://deploy-preview-7474.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -5,11 +5,9 @@
"type": "module",
"scripts": {
"start": "vite",
"start:static:build": "pm2 start proxy-server.js",
"stop:static:build": "pm2 stop proxy-server.js",
"start:static:build": "http-server dist -p 4201 --proxy http://127.0.0.1:4201?",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

serve the static dist folder with http-server

@@ -64,7 +65,7 @@ const WorkflowLinkTableCell = (props: WorkflowLinkTableCellProps) => {
const isV1Workflow = workflow.origin === WorkflowOriginEnum.NOVU_CLOUD_V1;

const workflowLink = isV1Workflow
? buildRoute(LEGACY_ROUTES.EDIT_WORKFLOW, {
? buildRoute(`${LEGACY_DASHBOARD_URL}/workflows/edit/:workflowId`, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use the legacy web app url to redirect instead of route on the current domain

Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit bd523cd
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/6781224306b5aa0008f05d7f
😎 Deploy Preview https://deploy-preview-7474.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -121,6 +119,7 @@
"express": "^4.21.0",
"globals": "^15.9.0",
"http-proxy-middleware": "^3.0.2",
"http-server": "^0.13.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, to run the dashboard as a static build

"dev": "pnpm start",
"build": "pnpm build:legacy && tsc -b && vite build",
"build:legacy": "rimraf legacy/* && pnpm nx build:web:for-dashboard @novu/web",
"build": "tsc -b && vite build",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are TSC and Vite required? I'd assume that vite build is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You added the same comment when I initialized project :P it was generated by CLI like this

Copy link
Contributor

Choose a reason for hiding this comment

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

hahahaha, I will open a PR to vite!

@LetItRock LetItRock requested a review from a team as a code owner January 9, 2025 15:45
@LetItRock LetItRock requested review from merrcury and removed request for a team January 9, 2025 15:45
@LetItRock LetItRock merged commit 185ac5f into next Jan 10, 2025
38 checks passed
@LetItRock LetItRock deleted the nv-5155-dashboard-remove-legacy-bundle branch January 10, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants