How check if Vue is in development mode? : <p>When I run my Vue app, the console shows:</p>

<pre><code>You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
</code></pre>

<p>So now I want to check if Vue is in development from inside my templates by using:</p>

<pre><code>console.log("mode is " + process.env.NODE_ENV)
</code></pre>

<p>But that only logs <code>undefined</code>
Is there a different way to find the NODE_ENV in Vue?</p>

<p>My webpack config has this part:</p>

<pre><code>if (process.env.NODE_ENV === 'production') {
  module.exports.devtool = '#source-map'
  // http://vue-loader.vuejs.org/en/workflow/production.html
  module.exports.plugins = (module.exports.plugins || []).concat([
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"production"'
      }
    }),
    new webpack.optimize.UglifyJsPlugin({
      sourceMap: true,
      compress: {
        warnings: false
      }
    }),
    new webpack.LoaderOptionsPlugin({
      minimize: true
    })
  ])
}
</code></pre>

<p>Perhaps relevant: I use typescript, so I included this type declaration:</p>

<pre><code>declare var process: {
    env: {
        NODE_ENV: string
    }
}
</code></pre>
