When packing under nuxt, I want to tell whether I am running npm run dev or build or the newly created script command. How can I tell the difference?

the packaged scripts are generated dynamically by nuxt. How to mark a global variable so that your business code can tell which command it is? (for example, the interface domain names of different commands are different)


customize a global variable, or use cross-env to set a variable when executing the script command, for example: "build:web": "cross-env BUILD_TARGET=web node. Electron-vue/build.js" , Can't you judge with process.env.BUILD_TARGET


https://zh.nuxtjs.org/api/con.
process.env.NODE_ENV in the business code?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bec3bb-31aec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bec3bb-31aec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?