Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1545

How to display a package.json version in the footer of the site?

$
0
0

I would like to display a version that is declared in the package.json file in the footer of my site

How can I do this?

I found this FAQ explanation in their documentation, but unfortunately I don't know to access it from my component

// svelte.config.jsimport { readFileSync } from 'fs';import { fileURLToPath } from 'url';const file = fileURLToPath(new URL('package.json', import.meta.url));const json = readFileSync(file, 'utf8');const pkg = JSON.parse(json);

Viewing all articles
Browse latest Browse all 1545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>