title: Better way to import Vite plugin
body: <p>I get an error when following the usage for <a href="https://github.com/zheeeng/vite-plugin-plain-text#readme" rel="nofollow noreferrer">vite-plugin-plain-text</a>:</p>
  <pre><code>import plainText from 'vite-plugin-plain-text';
  
  console.log(plainText);  // Check what we imported.
  let config = plainText(/LICENSE$/);
  </code></pre>
  <p>The output is:</p>
  <pre><code>{ default: [Function: plainText] }
  &gt; plainTextPlugin is not a function
  </code></pre>
  <p>Instead of importing a function, the import statement imported an object with a function named <code>default</code>. In the module JS file, <code>plainText</code> was exported like this:</p>
  <pre><code>Object.defineProperty(exports, &quot;__esModule&quot;, { value: true });
  ...
  exports.default = plainText;
  </code></pre>
  <p>I was able to successfully import like this:</p>
  <pre><code>import plainTextPlugin from 'vite-plugin-plain-text';
  let plainText = plainTextPlugin.default;
  let config = plainText(/LICENSE$/);
  </code></pre>
  <p>Is there a more elegant way to accomplish this import? <a href="https://medium.com/dailyjs/javascript-module-cheatsheet-7bd474f1d829" rel="nofollow noreferrer">JavaScript ‪Module Cheatsheet</a> doesn't have any pattern for importing a library that was exported like this library. Interestingly, the TS source code exports the module like this:</p>
  <pre><code>export default function plainText (...)
  </code></pre>