Leverage info from package.json in JS Files #3821
Unanswered
mtfoley
asked this question in
Troubleshooting
Replies: 1 comment
-
Might need to use commonjs const package = require(../package) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we have a project we're considering snowpack for and we are looking to import our package version from our package.json, and we are having trouble importing this. Would using
mount
option be the best way to get info from package.json into our app?For some context: open-sauced/open-sauced@f941072
When I try to use `import {version} from "../../package.json", it doesn't work either. We use it in a handful of places in the codebase: https://github.com/open-sauced/open-sauced/search?q=getAppVersion
Any help is appreciated!
cc @bdougie @0-vortex
Beta Was this translation helpful? Give feedback.
All reactions