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(useStrapiClient): import dns module only in development #370

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

ram-you
Copy link
Contributor

@ram-you ram-you commented Nov 28, 2023

This pull request addresses the warning related to the "dns" module externalization for browser compatibility in the useStrapiClient.mjs file. The warning appeared during the Vite resolve process, and this change ensures that the "dns" module is imported conditionally only in a server environment during development. This modification aligns with best practices for handling browser-incompatible modules and resolves the warning mentioned in the Vite troubleshooting guide.

Please review and merge at your earliest convenience. If there are any specific guidelines or adjustments needed, feel free to provide feedback. Thank you!

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

This pull request addresses the warning related to the "dns" module externalization for browser compatibility in the useStrapiClient.mjs file. The warning appeared during the Vite resolve process, and this change ensures that the "dns" module is imported conditionally only in a server environment during development. This modification aligns with best practices for handling browser-incompatible modules and resolves the warning mentioned in the Vite troubleshooting guide.

Please review and merge at your earliest convenience. If there are any specific guidelines or adjustments needed, feel free to provide feedback. Thank you!
Copy link

netlify bot commented Nov 28, 2023

Deploy Preview for nuxt-strapi-module canceled.

Name Link
🔨 Latest commit c471cad
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-strapi-module/deploys/6565bb1fdc5f4c00083b7e4f

@benjamincanac benjamincanac changed the title Resolve "dns" Module Externalization Warning in useStrapiClient.mjs fix(useStrapiClient): import dns module only in development Nov 28, 2023
@benjamincanac benjamincanac merged commit 8c696de into nuxt-modules:dev Nov 28, 2023
5 checks passed
@benjamincanac
Copy link
Member

Thanks! 😊

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