[Vuejs]-Inject external params during runtime in Vue.js Webpack project

0👍

I’m not aware of a way to get an external module into the webpack context (post bundle compilation).

In the HTML where you include your Webpack bundle, you could include your “external params” javascript file first and store those parameters in global scope.

If you want to abstract the global scope, you could create a bundled module which proxies the global scope, and then always access those variables via the bundled module. This way, in future if you want to change the source of that data, you can do it in one place.

Leave a comment