0👍
You could resolve it using the then
method of the Promise.
import(process.env.VUE_APP_CONFIG).then(myobj => {
console.log(myobj);
});
Or use the async
/ await
syntax to store the value from the Promise in a variable and use it in the same function scope.
(async () => {
const myobj = await import(process.env.VUE_APP_CONFIG);
console.log(myojb);
});
Both options are equally effective. The rest all comes down to preference.
- [Vuejs]-In VueJS, is there a way to make your binded styling react to the size change of the screen?
Source:stackexchange.com