Skip to content

Unable to use hooks in compiled package #4331

Answered by rschristian
pm0u asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like it works just fine for me, your built output is fine.

The only obvious thing I'd say is ditch npm link as it's... not great. All of the local linking utilities are quite awful and unreliable, to be frank. Use something like yalc to test packages locally instead, as this fixes a handful of problems you'll only encounter with local symlinks. The problem is likely that your lib is pulling its copy of Preact through the symlink, rather than using the copy in your app.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@pm0u
Comment options

@pm0u
Comment options

@pm0u
Comment options

@rschristian
Comment options

Answer selected by pm0u
@pm0u
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4330 on March 28, 2024 19:47.