OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How do I load pico css from node_modules in a svelte-kit app?

  • Thread starter Thread starter chovy
  • Start date Start date
C

chovy

Guest
Installed with $ npm install @picocss/pico -D

in rollup.config.js:

Code:
import css from "rollup-plugin-css-only";


...
    plugins: [
        css({ output: "static/bundle.css" }),
    ],

In ./routes/__layout.svelte I have:

Code:
<script>
    import "../../node_modules/@picocss/pico/css/pico.min.css";

</script>

Just get error in UI, and no css /bundle.css exists.

<p>Installed with <code>$ npm install @picocss/pico -D</code></p>
<p>in rollup.config.js:</p>
<pre><code>import css from "rollup-plugin-css-only";


...
plugins: [
css({ output: "static/bundle.css" }),
],
</code></pre>
<p>In ./routes/__layout.svelte I have:</p>
<pre><code><script>
import "../../node_modules/@picocss/pico/css/pico.min.css";

</script>
</code></pre>
<p>Just get error in UI, and no css /bundle.css exists.</p>
 

Latest posts

Top