Skip to content

Commit 2cb831a

Browse files
committed
Add Vite variable for determining service worker context
Fixes vaadin/hilla#2867
1 parent 05f0377 commit 2cb831a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flow-server/src/main/resources/vite.generated.ts

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ function buildSWPlugin(opts: { devMode: boolean }): PluginOption {
145145
replace({
146146
values: {
147147
'process.env.NODE_ENV': JSON.stringify(config.mode),
148+
'process.env.VITE_SW_CONTEXT': true,
148149
...config.define
149150
},
150151
preventAssignment: true

0 commit comments

Comments
 (0)