Skip to content

Get current package.json version #5198

Answered by slorber
nephix asked this question in Q&A
Jul 20, 2021 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

You should be able to do that, considering the import path is correct.
If this does not work you probably have an error message to share.

---
sidebar_position: 0
---

import packageJson from "../package.json";

<span>{packageJson.version}</span>

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@nephix
Comment options

@slorber
Comment options

slorber Jul 20, 2021
Collaborator

@nephix
Comment options

@nephix
Comment options

@slorber
Comment options

slorber Jul 21, 2021
Collaborator

Answer selected by slorber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants