Skip to content

Commit

Permalink
fix: add app version to sw env
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Aug 2, 2023
1 parent 4d1be2f commit 2207af2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/src/lib/pwa/compileServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function compileServiceWorker({ config, paths, mode }) {
// TODO: This could be cleaner if the production SW is built in the same
// way instead of using the CRA webpack config, so both can more easily
// share environment variables.
const env = getEnv({ name: config.title, ...getPWAEnvVars(config) })
const env = getEnv({
name: config.title,
version: config.version,
...getPWAEnvVars(config),
})

const webpackConfig = {
mode, // "production" or "development"
Expand Down

0 comments on commit 2207af2

Please sign in to comment.