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: opt in to import.meta.* properties #56

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

danielroe
Copy link
Contributor

Is your PR related to a specific issue/feature? Please describe and mention issues.

This is a very early PR to make this module compatible with changes we expect to release in Nuxt v5.

In Nuxt v3.7.0 we added support for import.meta.* (see original PR) and we've been gradually updating docs and moving across from the old process.* patterned variables.

As I'm sure you're aware, these variables are replaced at build-time and enable tree-shaking in bundled code.
This change affects runtime code (that is, that is processed by the Nuxt bundler, like vite or webpack) rather than code running in Node. So it really doesn't matter what the string is, but it makes more sense in an ESM-world to use import.meta rather than process.

(It might be worth updating the module compatibility as well to indicate it needs to have Nuxt v3.7.0+, but I'll leave that with you if you think this is a good approach.)

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Checklist:

  • Code style and linters are passing
  • Backwards compatibility is maintained
  • Requires documentation to be updated

@manchenkoff manchenkoff self-requested a review March 25, 2024 14:20
@manchenkoff manchenkoff self-assigned this Mar 25, 2024
@manchenkoff manchenkoff added the enhancement New feature or request label Mar 25, 2024
@manchenkoff
Copy link
Owner

Hey @danielroe, thanks for the contribution! That totally makes sense, I recently updated compatibility to nuxt: '^3.9.0', so it should be fine

@manchenkoff manchenkoff added this to the 0.2.0 milestone Mar 25, 2024
@manchenkoff manchenkoff merged commit 54cd045 into manchenkoff:main Mar 25, 2024
1 check passed
@danielroe danielroe deleted the process-client branch March 25, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants