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?
仅有的幸福2017-05-24 11:40:54
If you are using cli, you can judge based on process.env.NODE_ENV. This value is production when building and development when dev.