Global variable accessible from all pages

In that case, Cloudy, you may consider to create a public js file (let’s name it vars.js) with the definition of a globalVars object containing all the constants you need in your site, by using an expression like this:

export let globalVars = {
test : “jfjfjaofijaofj”,
test2 : “what does ‘jfjfjaofijaofj’ mean BTW”
};

Then in each webpage you can simply import that object by using this line:
import {globalVars} from ‘public/vars.js’;
// → And directly access the object internal properties like this:
Console.log(globalVars.test); //which should output: jfjfjaofijaofj