I have this problem, now the vue-cli+webpack project,

but I have a js file that may be modified, which is a variable, and then this variable will be used in axios.

clipboard.png
clipboard.png
index.html

clipboard.png
projectConfig

clipboard.png
this is the only error report

Dec.03,2021

src follows the right path? If the relative path is uncertain, use the absolute path


how do you write your projectConfig.js?

you can write this in your projectConfig.js:

const projectConfig = {
  ip:'http://192.168.0.204:9080',
}
export default projectConfig 

in this way, you can import this file into any component.

Menu