[Vuejs]-Access environment variables in handlebar template

0๐Ÿ‘

โœ…

I figured it out. I just had to pipe it via gulp to the template.

return gulp

    .pipe(hb()            
        .data({
            version: pkg.version,
            date: new Date().toISOString(),
            env: process.env.NODE_ENV,
            mtmUrl: process.env.MTM,
            serverData,
        })           

And then I was a ble to access it like this:

g.src= {{mtmUrl}};

Leave a comment