Skip to content

Commit

Permalink
fix(api): export correct version string
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Sep 25, 2023
1 parent 85ef046 commit 02fce3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export * from './types'
/**
* The NPM package version of Shifty.
*/
export const VERSION = String(process.env.npm_package_version)
export const VERSION = String(process.env.PACKAGE_VERSION)
5 changes: 5 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ const config = {
new Webpack.BannerPlugin(
`Shifty ${version} - https://github.com/jeremyckahn/shifty`
),
new Webpack.DefinePlugin({
'process.env.PACKAGE_VERSION': JSON.stringify(
require('./package.json').version
),
}),
],
}

Expand Down

0 comments on commit 02fce3f

Please sign in to comment.