title: rollup: how to require json but not include it in bundle
body: <p>I have a <code>json</code> file that is required somewhere in my <code>node</code> script, but I do <strong>not</strong> want to have it bundled by <code>rollup</code>. I want it to be treated as an "external". Every time the <code>json</code> file changes, the script should be able to pick up the changes without rebuilding the bundle by rollup. Currently, it is "hard coded" in the bundle:</p>
  
  <pre class="lang-js prettyprint-override"><code>// ./src/index.js
  const json = require('../example.json');
  
  </code></pre>
  
  <p>with <code>./example.json</code> as:</p>
  
  <pre><code>{
      "exampleValue": "X"
  }
  </code></pre>
  
  <p>returns a bundle that includes:</p>
  
  <pre class="lang-js prettyprint-override"><code>// ...
  var exampleValue = "X";
  var example = {
      exampleValue: exampleValue
  };
  
  var example$1 = /*#__PURE__*/Object.freeze({
      exampleValue: exampleValue,
      default: example
  });
  // ...
  </code></pre>
  
  <p>I've tried to exclude it with <a href="https://github.com/rollup/rollup-plugin-json" rel="noreferrer"><code>rollup-plugin-json</code></a>, but as I could have expected, it throws:</p>
  
  <blockquote>
    <p>[!] Error: Unexpected token (Note that you need rollup-plugin-json to import JSON files)</p>
  </blockquote>
  
  <p>Is it possible to mark a json file as external, the same way you can mark external packages through the <code>external</code> and <code>output.paths</code> proeprties in the rollup configuration file?</p>