natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
992 stars 57 forks source link

Getting this warning while building astro 3.0.4 #140

Closed geminigeek closed 7 months ago

geminigeek commented 10 months ago

hi,

just upgraded my app to Astro 3.0.4 , while building i am getting this warning below , any idea how to fix this ? , nothing seems to be broken , i am also using unplugin-icons/vite and unplugin-icons/resolver for icons i am using in my vue component , just mentioning it if its related. here is how i am using it

import IconsResolver from "unplugin-icons/resolver"
import { default as Icons } from "unplugin-icons/vite"

**** below is vite part of defineConfig from astro.config ***

vite: {
    plugins: [

      Components({
        resolvers: [IconsResolver()],
      }),
      Icons({
        compiler: "vue3",
      }),

    ],
  },
node_modules/astro-icon/lib/utils.ts (2:9) "Props" is not exported by "node_modules/astro-icon/lib/Props.ts", imported by "node_modules/astro-icon/lib/utils.ts".
node_modules/astro-icon/lib/utils.ts (2:16) "Optimize" is not exported by "node_modules/astro-icon/lib/Props.ts", imported by "node_modules/astro-icon/lib/utils.ts".
casekhor commented 9 months ago

I'm getting this with Astro 3.0.12 deploying to Vercel, not using vue

awcot commented 9 months ago

This is also appearing when building locally using default configuration

FDiskas commented 9 months ago

Same warning with astro v3.2.2

https://github.com/natemoo-re/astro-icon/blob/4c28f275f0b9721203494f3047bda262c706c5ca/packages/core/lib/utils.ts#L2

I believe that it should be

import type { Props, Optimize } from "./Props";

Simple PR https://github.com/natemoo-re/astro-icon/pull/145

Maitre999 commented 9 months ago

Same warning with astro v3.2.2

https://github.com/natemoo-re/astro-icon/blob/4c28f275f0b9721203494f3047bda262c706c5ca/packages/core/lib/utils.ts#L2

I believe that it should be

import type { Props, Optimize } from "./Props";

Simple PR #145

While building process (No SSR, local build), the two warnings are gone :

node_modules/astro-icon/lib/utils.ts (2:9) "Props" is not exported by "node_modules/astro-icon/lib/Props.ts", imported by "node_modules/astro-icon/lib/utils.ts".
node_modules/astro-icon/lib/utils.ts (2:16) "Optimize" is not exported by "node_modules/astro-icon/lib/Props.ts", imported by "node_modules/astro-icon/lib/utils.ts".