title: How to import markdown files in svelte kit?
body: <pre><code>&lt;script&gt;
      import Markdown from '../components/Markdown.svelte';
      import path from '../../static/assets/docs/overview.md';
  &lt;/script&gt;
  
  &lt;article class=&quot;prose prose-red max-w-none&quot;&gt;
      &lt;Markdown markdown={path} /&gt;
  &lt;/article&gt;
  </code></pre>
  <p>Here's the warning:</p>
  <pre><code>files in the public directory are served at the root path.
  Instead of /static/assets/docs/overview.md?import, use /assets/docs/overview.md?import.
  </code></pre>
  <p>If I use <code>import path from '/assets/docs/overview.md';</code> I get the following error:</p>
  <pre><code>9:30:18 PM [vite] Internal server error: Cannot import non-asset file /assets/docs/overview.md which is inside /public.JS/CSS files inside /public are copied as-is on build and can only be referenced via &lt;script src&gt; or &lt;link href&gt; in html.
    Plugin: vite:import-analysis
    File: /Users/me/www/underwriting-ui/src/routes/docs.svelte
        at TransformContext.transform (/Users/me/www/underwriting-ui/node_modules/vite/dist/node/chunks/dep-713b45e1.js:67350:31)
        at async Object.transform (/Users/me/www/underwriting-ui/node_modules/vite/dist/node/chunks/dep-713b45e1.js:42397:30)
        at async doTransform (/Users/me/www/underwriting-ui/node_modules/vite/dist/node/chunks/dep-713b45e1.js:56738:29)
  </code></pre>