[SOLVED] Global var issue (webpack or f7 problem) - chrome cache problem

Hello
since 2 or 3 version ago of f7 (now i’m on latest) usually I use to set global var into index.html

var db;

and this var is available in all components. All works fine… but now i have this error when I make code update and app refresh with hotreload (no error if I use empty cache and reload chrome button ).

Uncaught (in promise) Error: ReferenceError: db is not defined
at eval (component-loader.js:50)

Seems that index.html is ignored by hotload and only components are refreshed
webpack error or f7?

thanks in advance

i’ve created a new clean app, seems that hot reload on change not inject index.html extra code
but with forced cache cleaning from chrome, extra code is injected

app on start


code after code change and hotreload (<script>var test;</script> is removed)

Try var db; change to window.db =‘’;

it’s the same :frowning:

  • normal F5 reload or hotreload -> remove all JS in index.html
  • reload and empty cache -> not remove JS in index.html

seems chrome problem
safari and firefox works fine… but how solve with chrome? i’ve disabled cache into network -> Disable cache

resolved cleaning cache into Application -> Cache Storage -> workbox-precache-v2