Skip to content

MNTOR-3882 - make next/headers a dynamic import for cron job use #5423

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

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

rhelmer
Copy link
Collaborator

@rhelmer rhelmer commented Dec 16, 2024

References:

Jira: MNTOR-3882

Description

This cron job imports Next and React code for cron job use (so we can use JSX and MJML for email templates), however next/headers doesn't seem to import cleanly. Looking at the compiled JS code, it's not actually used, so I think the cleanest way to deal with this is to just make it a dynamic import.

How to test

npm run build-cronjobs && npm run cron:monthly-activity-free

Checklist (Definition of Done)

@rhelmer rhelmer requested a review from mansaj December 16, 2024 21:46
@rhelmer rhelmer self-assigned this Dec 16, 2024
Copy link

@rhelmer rhelmer merged commit 2b7e760 into main Dec 16, 2024
15 of 16 checks passed
@rhelmer rhelmer deleted the MNTOR-3882/make-headers-dynamic-import-for-cronjob branch December 16, 2024 22:30
Copy link

Cleanup completed - database 'blurts-server-pr-5423' destroyed, cloud run service 'blurts-server-pr-5423' destroyed

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.

2 participants