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

Replace "require" with import #1538

Merged
merged 2 commits into from
Aug 27, 2024
Merged

Replace "require" with import #1538

merged 2 commits into from
Aug 27, 2024

Conversation

andrzejewsky
Copy link
Member

@andrzejewsky andrzejewsky commented Aug 27, 2024

Scope of the PR

Context:

  • Some time ago we have changed "import" to "require" due to silent timeouts
  • It did solve the problem, but turns out not completelly, timeouts still happen, the execution time is lower, however still sometimes exceeds the limit
  • When bundlePagesExternals is enabled, and mjml is mentioned in serverComponentsExternalPackages, the regular "import" seems working fine, reducing webhook processing calls to ~2s

Related issues

Checklist

Copy link

changeset-bot bot commented Aug 27, 2024

🦋 Changeset detected

Latest commit: 1ed3f2b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
smtp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
saleor-app-avatax ✅ Ready (Inspect) Visit Preview Aug 27, 2024 10:16am
saleor-app-cms ✅ Ready (Inspect) Visit Preview Aug 27, 2024 10:16am
saleor-app-data-importer ✅ Ready (Inspect) Visit Preview Aug 27, 2024 10:16am
saleor-app-klaviyo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 10:16am
saleor-app-products-feed ✅ Ready (Inspect) Visit Preview Aug 27, 2024 10:16am
saleor-app-search ✅ Ready (Inspect) Visit Preview Aug 27, 2024 10:16am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
saleor-app-smtp ⬜️ Ignored (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 10:16am

Comment on lines -19 to +21
// Used require on purpose - when import where used, modules resolution failed
require("mjml"),
compile,
Copy link
Member

Choose a reason for hiding this comment

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

@andrzejewsky andrzejewsky marked this pull request as ready for review August 27, 2024 10:55
@andrzejewsky andrzejewsky requested a review from a team as a code owner August 27, 2024 10:55
@andrzejewsky andrzejewsky requested review from a team, witoszekdev and lkostrowski August 27, 2024 10:55
@andrzejewsky andrzejewsky merged commit b708a10 into main Aug 27, 2024
19 checks passed
@andrzejewsky andrzejewsky deleted the merx-862-remove-require branch August 27, 2024 11:08
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.

4 participants