vue config devServer agent not working in development mode
P粉178894235
P粉178894235 2024-03-26 21:10:46
0
1
456

I have added the devServer proxy target as

devServer: {
   proxy: {
     '^/': {
       target: 'https://xmlpi-ea.dhl.com/',
       ws: true,
       changeOrigin: true
     }
   }
  }

But it doesn't work when I build using npm run build, is there any solution?

P粉178894235
P粉178894235

reply all(1)
P粉835428659

This is for production not for development.

npm run build

If you are using vue-cli, you can use the following command to spin up your development server npm run serve

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!