title: How do I import a Material Web Component in SvelteKit?
body: <p>I followed the standard <a href="https://kit.svelte.dev/docs#introduction-getting-started" rel="nofollow noreferrer">tutorial in sveltkit</a> to create a Typescript Project for a basic template.</p>
  <p>I wanted to use <a href="https://github.com/material-components/material-components-web-components/tree/master/packages/button" rel="nofollow noreferrer">Material Web Component Button</a>.</p>
  <p>I <code>npm install @material/mwc-button</code>.</p>
  <p>Then I simply add the following to <code>routes/index.svelte</code></p>
  <pre><code>&lt;script&gt;
      import &quot;@material/mwc-button&quot;;
  &lt;/script&gt;
  </code></pre>
  <p>To which I get <code>SyntaxError: Cannot use import statement outside a module</code>.</p>
  <p>This is driving me crazy as it's step one of my requirement and this is week 3 of being stuck. I don't know even where to start. Is this a vite problem, sveltekit problem, mwc problem? Any advice would be amazing.</p>