-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Conversation
✅ Deploy Preview for dashboard-v2-novu-staging ready!
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?", |
There was a problem hiding this comment.
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`, { |
There was a problem hiding this comment.
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
✅ Deploy Preview for dev-web-novu ready!
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still required?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
What changed? Why was the change needed?
Remove the legacy Web app bundle folder from the Dashboard and do the URL redirects instead.
Screenshots