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

Support add import.meta.env.__${APPNAME}_VERSION__ in the App #4

Closed
wants to merge 2 commits into from

Conversation

censujiang
Copy link

I have tested it rigorously and currently this function works fine

@ZhongxuYang
Copy link
Owner

Hi, thanks for your PR!

But referencing information like import.meta.env.__${APPNAME}_VERSION__ will complicate usage given the premise that global variables are already provided. This may cause confusion for users.

You can also describe a more specific usage scenario about the need to support this approach.

Thanks again for your PR!

@censujiang
Copy link
Author

In your use, when the method is mounted on the window object, the version number cannot be obtained in SSR mode. In the new method I added, I mounted it to import.meta.env for standard use, which not only facilitates the application itself to call the version number in any case, but also facilitates other plugins to call this

@censujiang
Copy link
Author

I hope you will consider this pull request as soon as possible, thank you!

@censujiang
Copy link
Author

Hello? This pull request need to deel with.

@ZhongxuYang
Copy link
Owner

Sorry for not paying attention to the content on Github on weekdays.

This function has been added similarly in v0.0.9 (avoiding the introduction of the new ifImportMeta config, but modifying the mixin method of ifGlobal), and the version information can now be read in the node.js environment.

@censujiang
Copy link
Author

Ok, I saw your update log, by the way my ID is @censujiang not @censujian

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