Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Dynamic import with lib (react-lazily) #855

Closed
6 tasks done
b2whats opened this issue Nov 26, 2024 · 3 comments
Closed
6 tasks done

🐛 Dynamic import with lib (react-lazily) #855

b2whats opened this issue Nov 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@b2whats
Copy link

b2whats commented Nov 26, 2024

Prerequisites

Reproduction url

https://codesandbox.io/p/devbox/q3ykkh

Reproduction access

  • I've made sure the reproduction is publicly accessible

Description of the issue

I added --include-lib in command, but I still get a error

import { lazily } from "react-lazily";
import { Suspense } from "react";

const { Apple } = lazily(() => import("./components.ts"));
const C = lazily(() => import("./components.ts"));

function App() {
  return (
    <>
      <Suspense fallback={null}>
        <Apple />
      </Suspense>
      <Suspense fallback={null}>
        <C.Orange />
      </Suspense>
    </>
  );
}

export default App;
// components
export const Apple = () => "Apple!";
export const Orange = () => "Orange!";
> knip --include-libs

Unused exports (2)
Apple   unknown  src/components.ts:1:14
Orange  unknown  src/components.ts:2:14
@b2whats b2whats added the bug Something isn't working label Nov 26, 2024
@webpro webpro closed this as completed in 5242ddd Nov 27, 2024
@webpro
Copy link
Collaborator

webpro commented Nov 27, 2024

🚀 This issue has been resolved in v5.38.2. See Release 5.38.2 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

@webpro
Copy link
Collaborator

webpro commented Nov 27, 2024

Thanks for the report @b2whats, glad we got this finally sorted.

@b2whats
Copy link
Author

b2whats commented Nov 27, 2024

it's works. I thank you so much for the work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants