How to use 2 static directories when npm run dev in vue project

after creating the initial directory structure through vue init, there is a / static directory in the project where static resources can be placed. But now I want to create another directory that can also be used to put static resources in npm run dev.

(my goal is to use the second static directory to simulate access to the server api. The first static directory is the real static directory. So that npm run dev can fully simulate the process integrated with the backend. )

I have tried to modify the configuration of assetsSubDirectory in / config/index.js, but I can only modify it, not add one.

Mar.24,2021

simulate access to the server api? This feature recommends that the author use the proxyTable agent to forward the request. If vue-cli, set it in the config/index.js directory

Menu