The current project has a form of url=AAA "/api/list-101.json". I hope that this AAA can take different values according to different environments: "" or "xxxxx", for example, in Let him take "" when npm run dev, and take "xxxxx" when npm run build. How to configure it to achieve this?
If you are using cli, you can judge based on process.env.NODE_ENV. This value is production when building and development when dev.