title: How to export constants defined using object destructuring
body: <p>Guided by eslint's <a href="https://eslint.org/docs/rules/prefer-destructuring" rel="nofollow noreferrer">prefer-destructuring</a> rule, I defined some constants like this:</p>
  
  <pre><code>const {
      NODE_ENV,
      API_URL,
  } = process.env;
  </code></pre>
  
  <p>Is it possible to export these constants by prefixing the statement by <code>export</code>? </p>
  
  <pre><code>export const {
      NODE_ENV,
      API_URL,
  } = process.env;
  </code></pre>
  
  <p>This would seem natural, but <a href="https://www.npmjs.com/package/eslint-plugin-import" rel="nofollow noreferrer">eslint-plugin-import</a> complains about a violation of the <a href="https://github.com/benmosher/eslint-plugin-import/blob/HEAD/docs/rules/named.md" rel="nofollow noreferrer">import/named</a> rule: <code>API_URL not found in '../constants'</code>. In fact, this usage of <code>export</code> is also not described on the relevant <a href="https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export" rel="nofollow noreferrer">MDN page</a>.</p>
  
  <p>Do we then have to repeat all constants in a separate <code>export</code> statement?</p>
  
  <pre><code>const {
      NODE_ENV,
      API_URL,
  } = process.env;
  
  export {
      NODE_ENV,
      API_URL,
  };
  </code></pre>