0👍
Use https://webpack.js.org/plugins/define-plugin/ in vue.config.js
:
module.exports = {
configureWebpack: {
plugins: [
new webpack.DefinePlugin({
VUE_APP_ROOT_API: JSON.stringify(process.env.VUE_APP_ROOT_API),
}),
],
},
};
- [Vuejs]-Axios.get data from Mysql DB. Vue.js, Laravel
- [Vuejs]-Vuejs passing arguments with a routes href link
Source:stackexchange.com