Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Read playground version from package json
  • Loading branch information
pomber committed Jun 20, 2022
commit 603da42c7b5b86a38c2e9e510309cb932accc8be
2 changes: 1 addition & 1 deletion playground/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function App() {
<CodeHikeLogo />
<h1>
Code Hike
<span>v0.6.0</span>
<span>v{__APP_VERSION__}</span>
</h1>
</a>
<a href="https://codehike.org/docs">Docs</a>
Expand Down
3 changes: 3 additions & 0 deletions playground/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
});