ianmiller347 / feather-icons-react

Feather Icons as a React Component
46 stars 10 forks source link

Should 'prop-types' be a dependency? #45

Open araguma opened 9 months ago

araguma commented 9 months ago

If I don't have prop-types under packages in package-lock.json, I get this error when I try to load any feather icons:

Import trace for requested module:
./node_modules/feather-icons-react/build/index.js
./src/app/page.tsx
 ⨯ ./node_modules/feather-icons-react/build/FeatherIcon.js:10:40
Module not found: Can't resolve 'prop-types'

This can be reproduced by running npx create-next-app@latest and declining the 'use ESLint' option since it adds prop-types as a dependency. page.tsx can be something like this:

import FeatherIcon from "feather-icons-react";

export default function Home() {
    return (
        <FeatherIcon icon="feather" />
    );
}