Target to a custom Mode in Vue CLI

3rd December, 2019 1 min. read

Just a reminder and a TIL about customize the development setup of a Vue app with the CLI.

If you need to create a new custom Mode (other than ‘staging’, ‘test’ and ‘production’), here the tip:

if (process.env.NODE_ENV === 'mymode') {
  console.log("another mode!")
}

Tip mainly from here.


Spotted a typo or (likely) a grammar error? Send a pull request.