title: How do you work with dev, pre and prod with Snowpack?
body: <p>I want to define environment variables in my <code>package.json</code> where I'm using Snowpack, but as far as I know Snowpack sets the <code>NODE_ENV</code> automatically based on <a href="https://www.snowpack.dev/reference/environment-variables" rel="nofollow noreferrer">dev vs build</a>.</p>
  <p>Is it possible to define variables for 3 modes instead of 2, I mean:</p>
  <ul>
  <li>development</li>
  <li>preproduction</li>
  <li>production</li>
  </ul>
  <p>These are my scripts in my <code>package.json</code>:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;scripts&quot;: {
      &quot;start&quot;: &quot;snowpack dev&quot;,
      &quot;build&quot;: &quot;snowpack build NODE_ENV=pre&quot;,
      &quot;build:production&quot;: &quot;snowpack build NODE_ENV=pro&quot;
  }
  </code></pre>
  <p>However,  <code>import.meta.env.MODE</code> returns <code>production</code> for the 2 types of build.</p>
  <p>I couldn't make it work, maybe there is another way of doing this.</p>